0
我在一个sylius项目工作,我有一些功能测试工作。它发生了sylius已经切换到symfony 3.2和很多我的测试不再工作了之后。phpunit找不到教义注释
每当我试图运行测试,我得到这样的错误
Doctrine\Common\Annotations\AnnotationException: [Semantical Error] The annotation "@Doctrine\ORM\Mapping\Entity" in class ...\Entity\Block does not exist, or could not be auto-loaded.
我phpunit.xml看起来像
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true"
bootstrap="var/bootstrap.php.cache">
<php>
<server name="KERNEL_DIR" value="./app" />
</php>
<testsuites>
<testsuite name="Application Test Suite">
<directory>./src/AppBundle/Tests/</directory>
</testsuite>
</testsuites>
最后,我测试了这种设置
的abstract class BaseTestCase extends KernelTestCase {
...
protected function setUp()
{
static::bootKernel();
}
}
关于我的设置中可能出现错误的任何想法?