for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace GacelaTest\Integration\Framework\DocBlockResolverAware;
use Gacela\Framework\ClassResolver\DocBlockService\CustomServicesCache;
use Gacela\Framework\Gacela;
use PHPUnit\Framework\TestCase;
final class DocBlockResolverAwareTest extends TestCase
{
public static function setUpBeforeClass(): void
CustomServicesCache::resetCache();
}
protected function setUp(): void
Gacela::bootstrap(__DIR__);
public function test_existing_service(): void
$dummy = new DummyDocBlockResolverAware();
$actual = $dummy->getRepository()->findName();
self::assertSame('name', $actual);
/**
* @depends test_existing_service
*/
public function test_existing_service_cached(): void
self::assertCount(1, CustomServicesCache::getAll());
$dummy->getRepository()->findName();
public function test_non_existing_service(): void
$this->expectExceptionMessage('Missing the concrete return type for the method `getRepository()`');
$dummy = new BadDummyDocBlockResolverAware();
$dummy->getRepository();