Skip to content

Instantly share code, notes, and snippets.

@ger86
Last active April 23, 2019 08:49
Show Gist options
  • Save ger86/cc361b1ca651277d6aec6a1eb15e31e9 to your computer and use it in GitHub Desktop.
Save ger86/cc361b1ca651277d6aec6a1eb15e31e9 to your computer and use it in GitHub Desktop.
<?php
namespace App\Tests;
use Symfony\Component\Panther\PantherTestCase;
class BlogPostsControllerTest extends PantherTestCase {
public function testShowPost() {
$client = static::createPantherClient();
$client->followRedirects();
$crawler = $client->request('GET', 'blog');
$this->assertSame('My awesome blog', $crawler->filter('h1')->text());
$this->assertEquals(1, $crawler->filter('.container .posts')->count());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment