NivoSliderTestBase.php in Nivo Slider 8
File
lib/Drupal/nivo_slider/Tests/NivoSliderTestBase.php
View source
<?php
namespace Drupal\nivo_slider\Tests;
use Drupal\simpletest\WebTestBase;
abstract class NivoSliderTestBase extends WebTestBase {
public static $modules = [
'libraries',
'nivo_slider',
];
public function setUp() {
parent::setUp();
$this->admin_user = $this
->drupalCreateUser([
'administer blocks',
'access administration pages',
'administer nivo slider',
]);
$this
->drupalLogin($this->admin_user);
$this->block = $this
->drupalPlaceBlock('nivo_slider_slider_block');
}
public function getTestImage() {
$file = current($this
->drupalGetTestFiles('image'));
return $file;
}
}