function ImageStyleTest::setUp
Same name in other branches
- 9 core/modules/image/tests/src/Unit/ImageStyleTest.php \Drupal\Tests\image\Unit\ImageStyleTest::setUp()
- 10 core/modules/image/tests/src/Unit/ImageStyleTest.php \Drupal\Tests\image\Unit\ImageStyleTest::setUp()
- 11.x core/modules/image/tests/src/Unit/ImageStyleTest.php \Drupal\Tests\image\Unit\ImageStyleTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
modules/ image/ tests/ src/ Unit/ ImageStyleTest.php, line 82
Class
- ImageStyleTest
- @coversDefaultClass \Drupal\image\Entity\ImageStyle
Namespace
Drupal\Tests\image\UnitCode
protected function setUp() {
$this->entityTypeId = $this->randomMachineName();
$this->provider = $this->randomMachineName();
$this->entityType = $this->createMock('\\Drupal\\Core\\Entity\\EntityTypeInterface');
$this->entityType
->expects($this->any())
->method('getProvider')
->will($this->returnValue($this->provider));
$this->entityTypeManager = $this->createMock('\\Drupal\\Core\\Entity\\EntityTypeManagerInterface');
$this->entityTypeManager
->expects($this->any())
->method('getDefinition')
->with($this->entityTypeId)
->will($this->returnValue($this->entityType));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.