zhamao-framework/tests/ZM/Utils/SingletonTraitTest.php

18 lines
347 B
PHP
Raw Normal View History

2022-03-29 18:16:18 +08:00
<?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());
}
}