Tests/Controller/DefaultControllerTest.php
author cavaliet
Fri, 28 Oct 2011 14:57:11 +0200
changeset 22 99c15cfe420b
parent 1 06a22ff5d58d
permissions -rwxr-xr-x
Add ModifyTag from tag list. Add Reset Wikipedia info from tag list. Enable boolean from addJavascript controller/template to switch from list or document context.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
06a22ff5d58d first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
<?php
06a22ff5d58d first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
06a22ff5d58d first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
namespace IRI\Bundle\WikiTagBundle\Tests\Controller;
06a22ff5d58d first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
06a22ff5d58d first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
06a22ff5d58d first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
06a22ff5d58d first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
class DefaultControllerTest extends WebTestCase
06a22ff5d58d first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
{
06a22ff5d58d first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
    public function testIndex()
06a22ff5d58d first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
    {
06a22ff5d58d first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
        $client = static::createClient();
06a22ff5d58d first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
06a22ff5d58d first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
        $crawler = $client->request('GET', '/hello/Fabien');
06a22ff5d58d first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
06a22ff5d58d first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
        $this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0);
06a22ff5d58d first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
    }
06a22ff5d58d first commit forminimal bundle structure
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
}