You are here

protected function HandlerTest::assertEqualValue in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Tests/Handler/HandlerTest.php \Drupal\views\Tests\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, FALSE otherwise.

1 call to HandlerTest::assertEqualValue()
HandlerTest::testBreakString in core/modules/views/src/Tests/Handler/HandlerTest.php
Tests the breakString method.

File

core/modules/views/src/Tests/Handler/HandlerTest.php, line 208
Contains \Drupal\views\Tests\Handler\HandlerTest.

Class

HandlerTest
Tests abstract handler definitions.

Namespace

Drupal\views\Tests\Handler

Code

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