protected function FieldDateTest::assertRenderedFutureDatesEqual in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Tests/Handler/FieldDateTest.php \Drupal\views\Tests\Handler\FieldDateTest::assertRenderedFutureDatesEqual()
Asserts properly formatted display against 'destroyed' field in view.
Parameters
mixed $view: View to be tested.
array $map: Data map.
1 call to FieldDateTest::assertRenderedFutureDatesEqual()
- FieldDateTest::testFieldDate in core/
modules/ views/ src/ Tests/ Handler/ FieldDateTest.php - Sets up functional test of the views date field.
File
- core/
modules/ views/ src/ Tests/ Handler/ FieldDateTest.php, line 184 - Contains \Drupal\views\Tests\Handler\FieldDateTest.
Class
- FieldDateTest
- Tests the core Drupal\views\Plugin\views\field\Date handler.
Namespace
Drupal\views\Tests\HandlerCode
protected function assertRenderedFutureDatesEqual($view, $map) {
foreach ($map as $format => $result) {
$view->field['destroyed']->options['date_format'] = $format;
$view_result = $view->field['destroyed']
->advancedRender($view->result[0]);
$t_args = array(
'%value' => $result,
'%format' => $format,
'%actual' => $view_result,
);
$message = t('Value %value in %format matches %actual', $t_args);
$this
->assertEqual($view_result, $result, $message);
}
}