public function ViewsBlockTest::testGetPreviewFallbackString in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php \Drupal\Tests\views\Kernel\Plugin\ViewsBlockTest::testGetPreviewFallbackString()
- 10 core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php \Drupal\Tests\views\Kernel\Plugin\ViewsBlockTest::testGetPreviewFallbackString()
Tests that ViewsBlock::getPreviewFallbackString() produces the right value.
See also
\Drupal\views\Plugin\Block\ViewsBlockBase::getPreviewFallbackString()
File
- core/
modules/ views/ tests/ src/ Kernel/ Plugin/ ViewsBlockTest.php, line 135
Class
- ViewsBlockTest
- Tests native behaviors of the block views plugin.
Namespace
Drupal\Tests\views\Kernel\PluginCode
public function testGetPreviewFallbackString() {
$plugin_definition = [
'provider' => 'views',
];
$plugin_id = 'views_block:test_view_block-block_1';
$views_block = ViewsBlock::create($this->container, [], $plugin_id, $plugin_definition);
$this
->assertEqual($views_block
->getPreviewFallbackString(), '"test_view_block::block_1" views block');
}