3 namespace Drupal\Tests\blazy\Unit;
5 use Drupal\blazy\BlazyManager;
6 use Drupal\Tests\UnitTestCase;
7 use Drupal\Tests\blazy\Traits\BlazyUnitTestTrait;
8 use Drupal\Tests\blazy\Traits\BlazyManagerUnitTestTrait;
9 use Symfony\Component\DependencyInjection\ContainerInterface;
12 * Tests the Blazy manager base.
14 * @coversDefaultClass \Drupal\blazy\BlazyManagerBase
17 class BlazyManagerBaseUnitTest extends UnitTestCase {
19 use BlazyUnitTestTrait;
20 use BlazyManagerUnitTestTrait;
25 protected function setUp() {
28 $this->setUpUnitServices();
33 * @covers ::__construct
35 public function testBlazyManagerCreate() {
36 $container = $this->getMock(ContainerInterface::class);
37 $exception = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
40 ['entity_type.manager', $exception, $this->entityTypeManager],
41 ['module_handler', $exception, $this->moduleHandler],
42 ['renderer', $exception, $this->renderer],
43 ['config.factory', $exception, $this->configFactory],
44 ['cache.default', $exception, $this->cache],
47 $container->expects($this->any())
49 ->willReturnMap($map);
51 $blazyManager = BlazyManager::create($container);
52 $this->assertInstanceOf(BlazyManager::class, $blazyManager);