add singleton trait test

This commit is contained in:
sunxyw 2022-03-29 18:16:18 +08:00 committed by Jerry Ma
parent 37a92e03c1
commit 6f2e6135f1

View 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());
}
}