include_once __DIR__ . '/PolyfillTestCase.php';
+use PHPUnit\Extensions\SeleniumCommon\RemoteCoverage;
use PHPUnit\Framework\TestResult;
+use PHPUnit\Runner\BaseTestRunner;
/**
* Tests which involve interaction between the client and the server.
protected $collectCodeCoverageInformation;
protected $coverageScriptUrl;
+ /**
+ * @todo instead of overriding fail via _fail, implement Yoast\PHPUnitPolyfills\TestListeners\TestListenerDefaultImplementation
+ */
public static function _fail($message = '')
{
// save in a static var that this particular test has failed
* @param TestResult $result
* @return TestResult
* @throws Exception
+ *
+ * @todo instead of overriding run via _run, try to achieve this by implementing Yoast\PHPUnitPolyfills\TestListeners\TestListenerDefaultImplementation
*/
public function _run($result = NULL)
{
parent::_run($result);
if ($this->collectCodeCoverageInformation) {
- $coverage = new PHPUnit_Extensions_SeleniumCommon_RemoteCoverage(
+ $coverage = new RemoteCoverage(
$this->coverageScriptUrl,
$this->testId
);
return;
$out = ob_get_clean();
$status = $this->getStatus();
- if ($status == PHPUnit_Runner_BaseTestRunner::STATUS_ERROR
- || $status == PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE) {
+ if ($status == BaseTestRunner::STATUS_ERROR
+ || $status == BaseTestRunner::STATUS_FAILURE) {
echo $out;
}
}