mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-18 05:04:51 +08:00
add singleton trait test
This commit is contained in:
parent
37a92e03c1
commit
6f2e6135f1
17
tests/ZM/Utils/SingletonTraitTest.php
Normal file
17
tests/ZM/Utils/SingletonTraitTest.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\ZM\Utils;
|
||||
|
||||
use ZM\Utils\SingletonTrait;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class SingletonTraitTest extends TestCase
|
||||
{
|
||||
public function testGetInstance(): void
|
||||
{
|
||||
$mock = $this->getObjectForTrait(SingletonTrait::class);
|
||||
$this->assertEquals($mock, $mock::getInstance());
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user