public function SlickAdminUnitTest::testBlazyAdminCreate in Slick Carousel 8
Same name and namespace in other branches
- 8.2 tests/src/Unit/Form/SlickAdminUnitTest.php \Drupal\Tests\slick\Unit\Form\SlickAdminUnitTest::testBlazyAdminCreate()
@covers ::create @covers ::__construct @covers ::blazyAdmin @covers ::manager
File
- tests/
src/ Unit/ Form/ SlickAdminUnitTest.php, line 35
Class
- SlickAdminUnitTest
- Tests the Slick admin form.
Namespace
Drupal\Tests\slick\Unit\FormCode
public function testBlazyAdminCreate() {
$container = $this
->getMock(ContainerInterface::class);
$exception = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
$map = [
[
'blazy.admin.extended',
$exception,
$this->blazyAdminExtended,
],
[
'slick.manager',
$exception,
$this->slickManager,
],
];
$container
->expects($this
->any())
->method('get')
->willReturnMap($map);
$slickAdmin = SlickAdmin::create($container);
$this
->assertInstanceOf(SlickAdmin::class, $slickAdmin);
$this
->assertInstanceOf('\\Drupal\\blazy\\Dejavu\\BlazyAdminExtended', $slickAdmin
->blazyAdmin());
$this
->assertInstanceOf('\\Drupal\\slick\\SlickManagerInterface', $slickAdmin
->manager());
}