function MarkupInterfaceComparatorTest::testAssertEquals
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Test/Comparator/MarkupInterfaceComparatorTest.php \Drupal\KernelTests\Core\Test\Comparator\MarkupInterfaceComparatorTest::testAssertEquals()
- 10 core/tests/Drupal/KernelTests/Core/Test/Comparator/MarkupInterfaceComparatorTest.php \Drupal\KernelTests\Core\Test\Comparator\MarkupInterfaceComparatorTest::testAssertEquals()
- 11.x 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);
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.