Created
September 10, 2014 22:49
-
-
Save zyphlar/e6ae7e468a55dba47993 to your computer and use it in GitHub Desktop.
phpunit test example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme\Mybundle\Tests\Controller; | |
use Liip\FunctionalTestBundle\Test\WebTestCase; | |
use Symfony\Component\HttpFoundation\Session\Session; | |
class ControllerTest extends WebTestCase | |
{ | |
public function testVmplsNew() { | |
$crawler = $client->request('GET', '/admin/dashboard/'); | |
// visit account | |
$link = $crawler->filter('a.btn[href*="dashboard/account"]')->eq(0)->link(); | |
$crawler = $client->click($link); | |
$this->assertGreaterThan(0, $crawler->filter('html:contains("My Account")')->count()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment