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