public function ViewsBlockTest::testMachineNameSuggestion in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Tests/Plugin/ViewsBlockTest.php \Drupal\views\Tests\Plugin\ViewsBlockTest::testMachineNameSuggestion()
Tests that ViewsBlock::getMachineNameSuggestion() produces the right value.
See also
\Drupal\views\Plugin\Block::getmachineNameSuggestion().
File
- core/
modules/ views/ src/ Tests/ Plugin/ ViewsBlockTest.php, line 49 - Contains \Drupal\views\Tests\Plugin\ViewsBlockTest.
Class
- ViewsBlockTest
- Tests native behaviors of the block views plugin.
Namespace
Drupal\views\Tests\PluginCode
public function testMachineNameSuggestion() {
$plugin_definition = array(
'provider' => 'views',
);
$plugin_id = 'views_block:test_view_block-block_1';
$views_block = ViewsBlock::create($this->container, array(), $plugin_id, $plugin_definition);
$this
->assertEqual($views_block
->getMachineNameSuggestion(), 'views_block__test_view_block_block_1');
}