selenium-tor/Tests/GitHubTests.php

25 lines
624 B
PHP
Raw Normal View History

2016-12-19 13:48:55 -08:00
<?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());
}
}