FieldTypeTest.php in Zircon Profile 8.0
File
core/modules/block_content/src/Tests/Views/FieldTypeTest.php
View source
<?php
namespace Drupal\block_content\Tests\Views;
use Drupal\views\Views;
class FieldTypeTest extends BlockContentTestBase {
public static $testViews = array(
'test_field_type',
);
public function testFieldType() {
$block_content = $this
->createBlockContent();
$expected_result[] = array(
'id' => $block_content
->id(),
'type' => $block_content
->bundle(),
);
$column_map = array(
'id' => 'id',
'type:target_id' => 'type',
);
$view = Views::getView('test_field_type');
$this
->executeView($view);
$this
->assertIdenticalResultset($view, $expected_result, $column_map, 'The correct block_content type was displayed.');
}
}
Classes
Name |
Description |
FieldTypeTest |
Tests the Drupal\block_content\Plugin\views\field\Type handler. |