function 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, FALSE otherwise.

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\Handler

Code

protected function assertEqualValue($expected, $handler, $message = '', $group = 'Other') {
    if (empty($message)) {
        $message = t('Comparing @first and @second', [
            '@first' => implode(',', $expected),
            '@second' => implode(',', $handler->value),
        ]);
    }
    return $this->assert($expected == $handler->value, $message, $group);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.