use Drupal\Component\Diff\Engine\DiffOp;
use PHPUnit\Framework\TestCase;
+use PHPUnit\Framework\Error\Error;
/**
* Test DiffOp base class.
* @covers ::reverse
*/
public function testReverse() {
- $this->setExpectedException(\PHPUnit_Framework_Error::class);
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Error::class);
+ }
+ else {
+ $this->setExpectedException(\PHPUnit_Framework_Error::class);
+ }
$op = new DiffOp();
$result = $op->reverse();
}