This commit is contained in:
root 2016-12-19 13:48:55 -08:00
commit b641f863e8
5 changed files with 1445 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/vendor/
*~

25
Tests/GitHubTests.php Normal file
View File

@ -0,0 +1,25 @@
<?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());
}
}

BIN
Tests/selenium-server.jar Normal file

Binary file not shown.

9
composer.json Normal file
View File

@ -0,0 +1,9 @@
{
"require-dev": {
"phpunit/phpunit": "*",
"facebook/webdriver": "^1.2",
"se/selenium-server-standalone": "~2"
},
"require": {
}
}

1409
composer.lock generated Normal file

File diff suppressed because it is too large Load Diff