PHPUnit无法在Symfony捆绑包中找到测试

时间:2020-01-21 16:16:37

标签: phpunit symfony-2.8

我正在尝试进行测试:

namespace MyProject\MyBundle\Tests;

use Liip\FunctionalTestBundle\Test\WebTestCase;

class MyTest extends WebTestCase
{
    function testTest()
    {
        $this->assertTrue(true);
    }
}

哪个位于

myproject / src / mybundle / Tests

所以我去了我的PHPUnit.phar

myproject / bin / phpunit-7.5.20.phar

,并且在同一目录中具有此phpunit.xml配置:

<?xml version="1.0" encoding="UTF-8"?>

<phpunit bootstrap = "../vendor/autoload.php"
         backupGlobals               = "false"
         backupStaticAttributes      = "false"
         colors                      = "true"
         convertErrorsToExceptions   = "true"
         convertNoticesToExceptions  = "true"
         convertWarningsToExceptions = "true"
         processIsolation            = "false"
         stopOnFailure               = "false"
         >

    <testsuite name="test" >
        <directory>../src/mybundle/Tests/</directory>
    </testsuite>

</phpunit>

我希望它能够运行测试,而不是返回:

未执行测试!

我在这里做错什么了吗?

0 个答案:

没有答案