class DiffOpTest in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Component/Diff/Engine/DiffOpTest.php \Drupal\Tests\Component\Diff\Engine\DiffOpTest
- 10 core/tests/Drupal/Tests/Component/Diff/Engine/DiffOpTest.php \Drupal\Tests\Component\Diff\Engine\DiffOpTest
Test DiffOp base class.
The only significant behavior here is that ::reverse() should throw an error if not overridden. In versions of this code in other projects, reverse() is marked as abstract, which enforces some of this behavior.
@coversDefaultClass \Drupal\Component\Diff\Engine\DiffOp
@group Diff
Hierarchy
- class \Drupal\Tests\Component\Diff\Engine\DiffOpTest extends \PHPUnit\Framework\TestCase
Expanded class hierarchy of DiffOpTest
File
- core/
tests/ Drupal/ Tests/ Component/ Diff/ Engine/ DiffOpTest.php, line 20
Namespace
Drupal\Tests\Component\Diff\EngineView source
class DiffOpTest extends TestCase {
/**
* DiffOp::reverse() always throws an error.
*
* @covers ::reverse
*/
public function testReverse() {
$this
->expectException(Error::class);
$op = new DiffOp();
$result = $op
->reverse();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DiffOpTest:: |
public | function | DiffOp::reverse() always throws an error. |