Guest User

Untitled

a guest
Dec 12th, 2018
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <?php
  2.  
  3. class IndexControllerTest extends ControllerTestCase {
  4.  
  5. public function setUp() {
  6. parent::setUp();
  7. }
  8.  
  9. public function testIndexPageCanBeLoaded() {
  10. $this->dispatch('/');
  11.  
  12. // assertions
  13. $this->assertNotController('error');
  14. $this->assertNotAction('error');
  15. $this->assertController('index');
  16. $this->assertAction('index');
  17. }
  18.  
  19. public function testAlbumDisplay() {
  20. $this->dispatch('/');
  21. // assertions
  22. $this->assertNotQuery("img", "Found an image where there should not be one.");
  23. $this->assertQueryContentContains("h1", "My Albums", "Did not find the correct page title.");
  24. $this->assertQueryCountMin('table tr td', 1, "No albums in the database. Check database.");
  25. }
  26.  
  27. }
Add Comment
Please, Sign In to add comment