Skip to content

Instantly share code, notes, and snippets.

@jwage
Last active August 29, 2015 14:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwage/adf5cf776d4398f2bebc to your computer and use it in GitHub Desktop.
Save jwage/adf5cf776d4398f2bebc to your computer and use it in GitHub Desktop.
<?php
use PHPUnit_Framework_TestCase;
use Symfony\Component\DomCrawler\Crawler;
class SimpleHttpTest extends PHPUnit_Framework_TestCase
{
public function testHttp()
{
$crawler = new Crawler(file_get_contents('http://myapp.lcl/hello/Jon'));
$this->assertEquals(
'Hello Jon',
$crawler->filter('body > p')->text(),
'http://myapp.lcl/hello/jon should return "Hello Jon"'
);
}
}
@harikt
Copy link

harikt commented Oct 28, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment