Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class IndexControllerTest extends ControllerTestCase {
- public function setUp() {
- parent::setUp();
- }
- public function testIndexPageCanBeLoaded() {
- $this->dispatch('/');
- // assertions
- $this->assertNotController('error');
- $this->assertNotAction('error');
- $this->assertController('index');
- $this->assertAction('index');
- }
- public function testAlbumDisplay() {
- $this->dispatch('/');
- // assertions
- $this->assertNotQuery("img", "Found an image where there should not be one.");
- $this->assertQueryContentContains("h1", "My Albums", "Did not find the correct page title.");
- $this->assertQueryCountMin('table tr td', 1, "No albums in the database. Check database.");
- }
- }
Add Comment
Please, Sign In to add comment