I've been using Laravel and Symfony for a while and I'm very happy with the testing with DomCrawler. Now at work I'm using CakePHP 3, and I'm not comfortable with the integration testing system, it's like this:
$this->get('/miweb/add-page/rates/2');
$this->assertResponseOk();
$this->assertResponseContains( 'precio' );
$this->post('/miweb/add-page/rates/2', $data);
$this->assertResponseContains( '30€' );
$this->assertResponseContains( '90€' );
I've been looking for a way to integrate DomCrawler in the testing system, so that I could use $crawler->filter('body > p');, $form->submit() and all the functionality, but I've accomplished nothing. Has anyone done this? Is it possible?
Aucun commentaire:
Enregistrer un commentaire