protected function VerboseMessengerTest::setUp in Pathauto 8
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ VerboseMessengerTest.php, line 26
Class
- VerboseMessengerTest
- @coversDefaultClass \Drupal\pathauto\VerboseMessenger @group pathauto
Namespace
Drupal\Tests\pathauto\UnitCode
protected function setUp() {
$config_factory = $this
->getConfigFactoryStub([
'pathauto.settings' => [
'verbose' => TRUE,
],
]);
$account = $this
->createMock(AccountInterface::class);
$account
->expects($this
->once())
->method('hasPermission')
->withAnyParameters()
->willReturn(TRUE);
$messenger = $this
->createMock(MessengerInterface::class);
$this->messenger = new VerboseMessenger($config_factory, $account, $messenger);
}