Skip to content

Instantly share code, notes, and snippets.

@msonnabaum
Created March 22, 2013 23:06
Show Gist options
  • Save msonnabaum/5225432 to your computer and use it in GitHub Desktop.
Save msonnabaum/5225432 to your computer and use it in GitHub Desktop.
<?php
require 'mink.phar';
class TestForChx extends PHPUnit_Framework_TestCase {
function testProveToChxWeAreNotCrazy() {
$clientOptions = array();
$client = new \Behat\Mink\Driver\Goutte\Client();
$client->setClient(new \Guzzle\Http\Client('', $clientOptions));
$driver = new \Behat\Mink\Driver\GoutteDriver($client);
$session = new \Behat\Mink\Session($driver);
$session->start();
$session->visit('http://drupal.org/');
$this->assertEquals(200, $session->getStatusCode());
$content = $session->getPage()->getContent();
$this->assertContains('Come for the software, stay for the community', $content);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment