protected function HandlerTest::assertEqualValue in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Functional/Handler/HandlerTest.php \Drupal\Tests\views\Functional\Handler\HandlerTest::assertEqualValue()
Check to see if a value is the same as the value on a certain handler.
Parameters
$expected: The expected value to check.
\Drupal\views\Plugin\views\ViewsHandlerInterface $handler: The handler that has the $handler->value property to compare with first.
string $message: The message to display along with the assertion.
string $group: The type of assertion - examples are "Browser", "PHP".
Return value
bool TRUE if the assertion succeeded.
1 call to HandlerTest::assertEqualValue()
- HandlerTest::testBreakString in core/
modules/ views/ tests/ src/ Functional/ Handler/ HandlerTest.php - Tests the breakString method.
File
- core/
modules/ views/ tests/ src/ Functional/ Handler/ HandlerTest.php, line 239
Class
- HandlerTest
- Tests abstract handler definitions.
Namespace
Drupal\Tests\views\Functional\HandlerCode
protected function assertEqualValue($expected, $handler, $message = '', $group = 'Other') {
if (empty($message)) {
$message = t('Comparing @first and @second', [
'@first' => implode(',', $expected),
'@second' => implode(',', $handler->value),
]);
}
$this
->assertEquals($expected, $handler->value, $message);
return TRUE;
}