3 namespace Drupal\Tests\Component\Diff\Engine;
5 use Drupal\Component\Diff\Engine\DiffOp;
6 use PHPUnit\Framework\TestCase;
9 * Test DiffOp base class.
11 * The only significant behavior here is that ::reverse() should throw an error
12 * if not overridden. In versions of this code in other projects, reverse() is
13 * marked as abstract, which enforces some of this behavior.
15 * @coversDefaultClass \Drupal\Component\Diff\Engine\DiffOp
19 class DiffOpTest extends TestCase {
22 * DiffOp::reverse() always throws an error.
26 public function testReverse() {
27 $this->setExpectedException(\PHPUnit_Framework_Error::class);
29 $result = $op->reverse();