/** * @covers \StrictPhp\StrictPhpKernel::configureAop */ public function testIfAspectsWasRegisteredProperly() { $strictPhp = StrictPhpKernel::getInstance(); $strictPhp->init(['cacheDir' => realpath(__DIR__ . '/..') . '/integration-tests-go-cache/', 'includePaths' => [__DIR__]]); $container = $strictPhp->getContainer(); $this->assertInstanceOf(PropertyWriteAspect::class, $container->getAspect(PropertyWriteAspect::class)); $this->assertInstanceOf(PostConstructAspect::class, $container->getAspect(PostConstructAspect::class)); }
<?php require __DIR__ . '/../../vendor/autoload.php'; ini_set('display_errors', 1); ini_set('error_reporting', E_ALL); \StrictPhp\StrictPhpKernel::getInstance()->init(['debug' => true, 'cacheDir' => realpath(__DIR__ . '/..') . '/integration-tests-go-cache/', 'includePaths' => [realpath(__DIR__ . '/../StrictPhpTestAsset')]]);