From 1990517b2263a080946853ed697a6d687262ae80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sat, 31 Jan 2015 15:36:04 +0100 Subject: remove Acme and AppBundle --- .../Tests/Controller/DemoControllerTest.php | 45 ---------------------- 1 file changed, 45 deletions(-) delete mode 100644 src/Acme/DemoBundle/Tests/Controller/DemoControllerTest.php (limited to 'src/Acme/DemoBundle/Tests/Controller') diff --git a/src/Acme/DemoBundle/Tests/Controller/DemoControllerTest.php b/src/Acme/DemoBundle/Tests/Controller/DemoControllerTest.php deleted file mode 100644 index d2176897..00000000 --- a/src/Acme/DemoBundle/Tests/Controller/DemoControllerTest.php +++ /dev/null @@ -1,45 +0,0 @@ -request('GET', '/demo/hello/Fabien'); - - $this->assertGreaterThan(0, $crawler->filter('html:contains("Hello Fabien")')->count()); - } - - public function testSecureSection() - { - $client = static::createClient(); - - // goes to the secure page - $crawler = $client->request('GET', '/demo/secured/hello/World'); - - // redirects to the login page - $crawler = $client->followRedirect(); - - // submits the login form - $form = $crawler->selectButton('Login')->form(array('_username' => 'admin', '_password' => 'adminpass')); - $client->submit($form); - - // redirect to the original page (but now authenticated) - $crawler = $client->followRedirect(); - - // check that the page is the right one - $this->assertCount(1, $crawler->filter('h1.title:contains("Hello World!")')); - - // click on the secure link - $link = $crawler->selectLink('Hello resource secured')->link(); - $crawler = $client->click($link); - - // check that the page is the right one - $this->assertCount(1, $crawler->filter('h1.title:contains("secured for Admins only!")')); - } -} -- cgit v1.2.3