public function MarkupInterfaceComparatorTest::testAssertEquals in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/Test/Comparator/MarkupInterfaceComparatorTest.php \Drupal\KernelTests\Core\Test\Comparator\MarkupInterfaceComparatorTest::testAssertEquals()
@covers ::assertEquals @dataProvider dataSetProvider
File
- core/
tests/ Drupal/ KernelTests/ Core/ Test/ Comparator/ MarkupInterfaceComparatorTest.php, line 145
Class
Namespace
Drupal\KernelTests\Core\Test\ComparatorCode
public function testAssertEquals($expected, $actual, $accepts_result, $equals_result) {
try {
$this
->assertNull($this->comparator
->assertEquals($expected, $actual));
$this
->assertTrue($equals_result);
} catch (\Throwable $e) {
if ($equals_result === FALSE) {
$this
->assertNotNull($e
->getMessage());
}
else {
$this
->assertInstanceOf($equals_result, $e);
}
}
}