Created
May 4, 2012 09:49
-
-
Save testingbot/2593676 to your computer and use it in GitHub Desktop.
php send mail on failure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class SimpleTest extends PHPUnit_Extensions_TestingBotTestCase | |
{ | |
protected function onNotSuccessfulTest(Exception $e) | |
{ | |
mail("[email protected]", "Failed test", $e->getMessage()); | |
parent::onNotSuccessfulTest($e); | |
} | |
public static $browsers = array( | |
array( | |
'name' => "Windows firefox 8", | |
'platform' => 'WINDOWS', | |
'browser' => 'iexplore', | |
'browserVersion' => '9' | |
), | |
); | |
protected function setUp() | |
{ | |
$this->setHost('hub.testingbot.com'); | |
$this->setPort(4444); | |
$this->setBrowserUrl('http://google.com'); | |
} | |
public function testAgain() | |
{ | |
$this->open('/'); | |
$this->assertTitle('Yahoo'); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment