protected function ResponsiveImageStyleConfigEntityUnitTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php \Drupal\Tests\responsive_image\Unit\ResponsiveImageStyleConfigEntityUnitTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
modules/ responsive_image/ tests/ src/ Unit/ ResponsiveImageStyleConfigEntityUnitTest.php, line 44 - Contains \Drupal\Tests\responsive_image\Unit\ResponsiveImageStyleConfigEntityUnitTest.
Class
- ResponsiveImageStyleConfigEntityUnitTest
- @coversDefaultClass \Drupal\responsive_image\Entity\ResponsiveImageStyle @group block
Namespace
Drupal\Tests\responsive_image\UnitCode
protected function setUp() {
$this->entityType = $this
->getMock('\\Drupal\\Core\\Entity\\EntityTypeInterface');
$this->entityType
->expects($this
->any())
->method('getProvider')
->will($this
->returnValue('responsive_image'));
$this->entityManager = $this
->getMock('\\Drupal\\Core\\Entity\\EntityManagerInterface');
$this->entityManager
->expects($this
->any())
->method('getDefinition')
->with('responsive_image_style')
->will($this
->returnValue($this->entityType));
$this->breakpointManager = $this
->getMock('\\Drupal\\breakpoint\\BreakpointManagerInterface');
$container = new ContainerBuilder();
$container
->set('entity.manager', $this->entityManager);
$container
->set('breakpoint.manager', $this->breakpointManager);
\Drupal::setContainer($container);
}