Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class GoogleTest extends \PHPUnit_Extensions_Selenium2TestCase
- {
- private static $first = true;
- function setUp()
- {
- if (self::$first)
- {
- $this->setBrowser("firefox");
- $this->setBrowserUrl("https://www.google.com/");
- $this->setHost("127.0.0.1");
- $this->setPort(4444);
- $this->shareSession(TRUE);
- $this->prepareSession();
- self::$first = false;
- }
- }
- public function onNotSuccessfulTest(Exception $e)
- {
- //$this->getStrategy()->notSuccessfulTest();
- throw $e;
- }
- function testGoogle()
- {
- $this->url('/');
- $this->assertTrue((bool) true);
- }
- function testGoogle2()
- {
- $this->url('/');
- $this->assertFalse((bool) true); // fail
- }
- function testGoogle3()
- {
- $this->url('/');
- $this->byId("not_exists")->click(); // error
- }
- function testGoogle4()
- {
- $this->url('/');
- $this->assertTrue((bool) true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement