Witam . Instaluje od nowa paczkę symfony 3.3 . Wpisuje w cmd phpunit tests\AppBundle\Controller\DefaultContr
ollerTest.php i pokazuje mi komunikat : No test executed . Co robię źle?
namespace Tests\AppBundle\Controller; class DefaultControllerTest { public function testIndex() { $crawler = $client->request('GET', '/eppend'); $this->assertEquals(200, $client->getResponse()->getStatusCode()); $this->assertContains('Welcome to Symfonye', $crawler->filter('#container h1')->text()); } }
<?xml version="1.0" encoding="UTF-8"?> <!-- <a href="https://phpunit.de/manual/current/en/appendixes.configuration.html" target="_blank">https://phpunit.de/manual/current/en/append...figuration.html</a> --> <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="vendor/autoload.php" > <php> <ini name="error_reporting" value="-1" /> <server name="KERNEL_CLASS" value="AppKernel" /> </php> <testsuites> <testsuite name="Project Test Suite"> <directory>tests</directory> </testsuite> </testsuites> <filter> <whitelist> <directory>src</directory> <exclude> <directory>src/*Bundle/Resources</directory> <directory>src/*/*Bundle/Resources</directory> <directory>src/*/Bundle/*Bundle/Resources</directory> </exclude> </whitelist> </filter> </phpunit>
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class DefaultControllerTest extends WebTestCase