FriendsOfPHP / Goutte

Goutte, a simple PHP Web Scraper
MIT License
9.26k stars 1.01k forks source link

PHPUnit Controller Symfony# #344

Closed Emmanuellut closed 6 years ago

Emmanuellut commented 6 years ago

Can't understand this fix! What's the best practice??

Tests\xxxBundle\Controller\DefaultControllerTest::testProfile Failed asserting that null matches expected 'xxxBundle\Controlleer\DefaultController::profileAction'.


public function testProfile() { $client = static::createClient();

    $crawler = $client->request('GET', '/');
   // $response = $this->client->getResponse();

    $this->assertEquals('xxxBundle\Controller\DefaultController::indexAction', 
                        $client->getRequest()->attributes->get('_controller'));
}