You are here

public function GridStackFormUnitTest::testBlazyAdminCreate in GridStack 8

@covers ::create @covers ::__construct

File

tests/src/Unit/Form/GridStackFormUnitTest.php, line 47

Class

GridStackFormUnitTest
Tests the GridStack admin form.

Namespace

Drupal\Tests\gridstack\Unit\Form

Code

public function testBlazyAdminCreate() {
  $container = $this
    ->getMock(ContainerInterface::class);
  $exception = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
  $map = [
    [
      'file_system',
      $exception,
      $this->fileSystem,
    ],
    [
      'messenger',
      $exception,
      $this->messenger,
    ],
    [
      'blazy.admin',
      $exception,
      $this->blazyAdmin,
    ],
    [
      'gridstack.manager',
      $exception,
      $this->gridstackManager,
    ],
  ];
  $container
    ->expects($this
    ->any())
    ->method('get')
    ->willReturnMap($map);
  $gridstackForm = GridStackForm::create($container);
  $this
    ->assertInstanceOf(GridStackForm::class, $gridstackForm);
}