public function ModalPageTest::setUp in Modal 8.2
Same name in this branch
- 8.2 tests/src/Unit/ModalPageTest.php \Drupal\Tests\modal_page\Unit\ModalPageTest::setUp()
- 8.2 tests/src/Kernel/ModalPageTest.php \Drupal\Tests\modal_page\Kernel\ModalPageTest::setUp()
Same name and namespace in other branches
- 8.3 tests/src/Unit/ModalPageTest.php \Drupal\Tests\modal_page\Unit\ModalPageTest::setUp()
Initial setUp to tests.
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ ModalPageTest.php, line 26
Class
- ModalPageTest
- Tests for ModalPage class.
Namespace
Drupal\Tests\modal_page\UnitCode
public function setUp() {
parent::setUp();
$this->languageManager = $this
->createMock(LanguageManager::class);
$this->entityTypeManager = $this
->createMock(EntityTypeManager::class);
$this->configFactory = $this
->getConfigFactoryStub([
'modal_page.settings' => [
'no_modal_page_external_js' => TRUE,
'allowed_tags' => "h1,h2,a,b,big,code,del,em,i,ins,pre,q,small,span,strong,sub,sup,tt,ol,ul,li,p,br,img",
],
]);
$this->database = $this
->createMock(Connection::class);
$this->requestStack = $this
->createMock(RequestStack::class);
$this->pathMatcher = $this
->createMock(PathMatcher::class);
$this->uuid = $this
->createMock(UuidInterface::class);
$this->currentUser = $this
->createMock(AccountProxy::class);
$this->aliasManager = $this
->createMock(AliasManager::class);
$this->modalPage = new ModalPage($this->languageManager, $this->entityTypeManager, $this->configFactory, $this->database, $this->requestStack, $this->pathMatcher, $this->uuid, $this->currentUser, $this->aliasManager);
}