Valinor/tests/Unit/Utility/SingletonTest.php
Romain Canon 396f64a524 feat: initial release
🎉
2021-11-28 18:21:56 +01:00

28 lines
635 B
PHP

<?php
declare(strict_types=1);
namespace CuyZ\Valinor\Tests\Unit\Utility;
use CuyZ\Valinor\Utility\Singleton;
use PHPUnit\Framework\TestCase;
final class SingletonTest extends TestCase
{
public function test_annotation_reader_is_singleton(): void
{
$instanceA = Singleton::annotationReader();
$instanceB = Singleton::annotationReader();
self::assertSame($instanceA, $instanceB);
}
public function test_php_parser_is_singleton(): void
{
$instanceA = Singleton::phpParser();
$instanceB = Singleton::phpParser();
self::assertSame($instanceA, $instanceB);
}
}