public/phpmyadmin/vendor/phpunit/phpunit-selenium/Tests/SeleniumTestCase/FailuresTest.php
/**
     * Related also to ticket #135.
     */
Related also to ticket #135.
Related also to ticket #135 .
public function testScreenshotsAreCapturedOnErrorsWhenRequired()
    {
        $this->captureScreenshotOnFailure = true;
        $this->screenshotPath = sys_get_temp_dir();
        $this->screenshotUrl = 'http://...';
        try {
            $originalException = $this->getAnError();
            $this->onNotSuccessfulTest($originalException);
        } catch (Exception $e) {
            $this->assertTrue(file_exists($this->screenshotPath));
            $message = $e->getMessage();
            $this->assertTrue((bool) strstr($message, 'Screenshot: http://.../'), "Excpetion message does not contain screenshot path: `$message`");
            return;
        }
        $this->fail('An exception should have been raised by now.');
    }
public function testScreenshotsAreCapturedOnErrorsWhenRequired ( ) { $ this -> captureScreenshotOnFailure = true ; $ this -> screenshotPath = sys_get_temp_dir ( ) ; $ this -> screenshotUrl = 'http://...' ; try { $ originalException = $ this -> getAnError ( ) ; $ this -> onNotSuccessfulTest ( $ originalException ) ; } catch ( Exception $ e ) { $ this -> assertTrue ( file_exists ( $ this -> screenshotPath ) ) ; $ message = $ e -> getMessage ( ) ; $ this -> assertTrue ( ( bool ) strstr ( $ message , 'Screenshot: http://.../' ) , " Excpetion message does not contain screenshot path: ` $ message ` " ) ; return ; } $ this -> fail ( 'An exception should have been raised by now.' ) ; }
Related also to ticket #135.
Related also to ticket #135 .