You are here

protected function viewsFieldViewTestCase::assertContains in Views Field View 7

Assert method which checks whether the first string is part of the second string.

Parameters

$first: The first value to check.

$second: The second value to check.

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.

2 calls to viewsFieldViewTestCase::assertContains()
viewsFieldViewTestCase::testChildViewWithFieldapiField in tests/views_field_view.test
Test a child view using a fieldapi field.
viewsFieldViewTestCase::testNormalView in tests/views_field_view.test
@todo Test normal view embedding.

File

tests/views_field_view.test, line 40
Contains the test for views_field_view

Class

viewsFieldViewTestCase
@file Contains the test for views_field_view

Code

protected function assertContains($first, $second, $message = '', $group = 'Other') {
  return $this
    ->assert(strpos($second, $first) !== FALSE, $message ? $message : t('Value @first is equal to value @second.', array(
    '@first' => var_export($first, TRUE),
    '@second' => var_export($second, TRUE),
  )), $group);
}