I am starting with phpUnit. Therefore i have questions. Let's say i want to test if link is valid an i will be redirected to another site.
$crawler = $client->request('GET', '/client/list');
$link = $crawler->selectLink('sometext')->link();
$lista = $client->click($link);
$this->assertEquals(1, $lista->filter('h1:contains("Contact")')->count());
However what i would like to do is to select link with specific href. Something like this.
$crawler = $client->request('GET', '/client/list');
$link = $crawler->selectLink('a[href="url"]')->link();
$lista = $client->click($link);
$this->assertEquals(1, $lista->filter('h1:contains("Contact")')->count());
Is it possible? The second question is much more general. I dont know what to test in functional testing. I want my tests to be repetitive. Should i test forms, or routing? Could someone tell me what are your practices?