Skip to content

Commit

Permalink
[9-15] ブログ記事一覧のテスト
Browse files Browse the repository at this point in the history
  • Loading branch information
hidenorigoto committed Dec 28, 2015
1 parent 9cf1c8e commit b4ae24c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/lists/ch09/09-15.txt
@@ -0,0 +1,21 @@
<?php
namespace AppBundle\Tests\Controller;

use Liip\FunctionalTestBundle\Test\WebTestCase;

class BlogControllerTest extends WebTestCase
{
/**
* @test
*/
public function ブログ記事一覧が表示されること()
{
$client = static::createClient();
$crawler = $client->request('GET', '/blog/');

$this->assertThat(
$crawler->filter('li.blog-article')->count(),
$this->equalTo(20)
);
}
}
21 changes: 21 additions & 0 deletions src/AppBundle/Tests/Controller/BlogControllerTest.php
@@ -0,0 +1,21 @@
<?php
namespace AppBundle\Tests\Controller;

use Liip\FunctionalTestBundle\Test\WebTestCase;

class BlogControllerTest extends WebTestCase
{
/**
* @test
*/
public function ブログ記事一覧が表示されること()
{
$client = static::createClient();
$crawler = $client->request('GET', '/blog/');

$this->assertThat(
$crawler->filter('li.blog-article')->count(),
$this->equalTo(20)
);
}
}

0 comments on commit b4ae24c

Please sign in to comment.