25 lines
624 B
PHP
25 lines
624 B
PHP
|
<?php
|
||
|
|
||
|
use Facebook\WebDriver\Remote\DesiredCapabilities;
|
||
|
use Facebook\WebDriver\Remote\RemoteWebDriver;
|
||
|
|
||
|
require 'vendor/autoload.php';
|
||
|
|
||
|
class GitHubTests extends PHPUnit_Framework_TestCase {
|
||
|
|
||
|
protected $webDriver;
|
||
|
protected $url = 'https://github.com';
|
||
|
|
||
|
public function setUp() {
|
||
|
$this->webDriver = RemoteWebDriver::create('http://localhost:4444/wd/hub', DesiredCapabilities::firefox());
|
||
|
}
|
||
|
|
||
|
public function tearDown()
|
||
|
{
|
||
|
$this->webDriver->quit();
|
||
|
}
|
||
|
public function testGitHubHome() {
|
||
|
$this->webDriver->get($this->url);
|
||
|
$this->assertContains('GitHub', $this->webDriver->getTitle());
|
||
|
}
|
||
|
}
|