| @@ 24-32 (lines=9) @@ | ||
| 21 | $this->assertContains('Statistic', $crawler->filter('h2')->text()); |
|
| 22 | } |
|
| 23 | ||
| 24 | public function testArticles(){ |
|
| 25 | $client = static::createClient(); |
|
| 26 | ||
| 27 | $crawler = $client->request('GET', '/admin/articles'); |
|
| 28 | ||
| 29 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); |
|
| 30 | $this->assertContains('Articles', $crawler->filter('h2')->text()); |
|
| 31 | $this->assertEquals(2, $crawler->filter('tr')->count()); |
|
| 32 | } |
|
| 33 | ||
| 34 | public function testTags(){ |
|
| 35 | $client = static::createClient(); |
|
| @@ 34-42 (lines=9) @@ | ||
| 31 | $this->assertEquals(2, $crawler->filter('tr')->count()); |
|
| 32 | } |
|
| 33 | ||
| 34 | public function testTags(){ |
|
| 35 | $client = static::createClient(); |
|
| 36 | ||
| 37 | $crawler = $client->request('GET', '/admin/tags'); |
|
| 38 | ||
| 39 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); |
|
| 40 | $this->assertContains('Tags', $crawler->filter('h2')->text()); |
|
| 41 | $this->assertEquals(3, $crawler->filter('tr')->count()); |
|
| 42 | } |
|
| 43 | ||
| 44 | public function testComments(){ |
|
| 45 | $client = static::createClient(); |
|
| @@ 44-52 (lines=9) @@ | ||
| 41 | $this->assertEquals(3, $crawler->filter('tr')->count()); |
|
| 42 | } |
|
| 43 | ||
| 44 | public function testComments(){ |
|
| 45 | $client = static::createClient(); |
|
| 46 | ||
| 47 | $crawler = $client->request('GET', '/admin/comments'); |
|
| 48 | ||
| 49 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); |
|
| 50 | $this->assertContains('Comments', $crawler->filter('h2')->text()); |
|
| 51 | $this->assertEquals(3, $crawler->filter('tr')->count()); |
|
| 52 | } |
|
| 53 | ||
| 54 | public function testUsers(){ |
|
| 55 | $client = static::createClient(); |
|
| @@ 54-62 (lines=9) @@ | ||
| 51 | $this->assertEquals(3, $crawler->filter('tr')->count()); |
|
| 52 | } |
|
| 53 | ||
| 54 | public function testUsers(){ |
|
| 55 | $client = static::createClient(); |
|
| 56 | ||
| 57 | $crawler = $client->request('GET', '/admin/users'); |
|
| 58 | ||
| 59 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); |
|
| 60 | $this->assertContains('Users', $crawler->filter('h2')->text()); |
|
| 61 | $this->assertEquals(2, $crawler->filter('tr')->count()); |
|
| 62 | } |
|
| 63 | ||
| 64 | public function testUsersDelete(){ |
|
| 65 | $client = static::createClient(); |
|
| @@ 74-82 (lines=9) @@ | ||
| 71 | $crawler->filter('.alert')->text()); |
|
| 72 | } |
|
| 73 | ||
| 74 | public function testRoles(){ |
|
| 75 | $client = static::createClient(); |
|
| 76 | ||
| 77 | $crawler = $client->request('GET', '/admin/roles'); |
|
| 78 | ||
| 79 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); |
|
| 80 | $this->assertContains('Roles', $crawler->filter('h2')->text()); |
|
| 81 | $this->assertEquals(2, $crawler->filter('tr')->count()); |
|
| 82 | } |
|
| 83 | ||
| 84 | public function testRolesDelete(){ |
|
| 85 | $client = static::createClient(); |
|
| @@ 94-103 (lines=10) @@ | ||
| 91 | $this->assertContains('Submit Comment', $crawler->filter('button')->text()); |
|
| 92 | } |
|
| 93 | ||
| 94 | public function testCommentsList() |
|
| 95 | { |
|
| 96 | $client = static::createClient(); |
|
| 97 | ||
| 98 | $crawler = $client->request('GET', '/comments/test_title'); |
|
| 99 | ||
| 100 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); |
|
| 101 | $this->assertContains('Comments (1)', $crawler->filter('.section-heading')->text()); |
|
| 102 | $this->assertContains('Text comment', $crawler->filter('.media-body p')->text()); |
|
| 103 | } |
|
| 104 | ||
| 105 | public function testSuccess() |
|
| 106 | { |
|