TagadelicBlockTest.php in Tagadelic 8.3
File
src/Tests/TagadelicBlockTest.php
View source
<?php
namespace Drupal\tagadelic\Tests;
use Drupal\simpletest\WebTestBase;
use Drupal\Core\Config\Schema\SchemaIncompleteException;
class TagadelicBlockTest extends WebTestBase {
public static $modules = array(
'tagadelic',
'taxonomy',
'block',
);
function testTagadelicBlock() {
$web_user = $this
->drupalCreateUser(array(
'administer blocks',
));
$this
->drupalLogin($web_user);
$theme_name = \Drupal::config('system.theme')
->get('default');
$this
->drupalGet('/admin/structure/block/library/' . $theme_name);
$this
->assertRaw(t('Tagadelic tag cloud'), 'Block label found.');
$settings = array(
'label' => t('Tagadelic tag cloud test'),
'id' => 'tagadelic_block',
'theme' => $theme_name,
'num_tags_block' => 5,
);
$this
->drupalPlaceBlock('tagadelic_block', $settings);
$this
->drupalGet('');
$this
->assertRaw($settings['label'], 'Block found.');
}
}