protected function SimpleFbConnectPostLoginManagerTest::setUp in Simple FB Connect 8.3
Same name and namespace in other branches
- 8.2 tests/src/Unit/SimpleFbConnectPostLoginManagerTest.php \Drupal\Tests\simple_fb_connect\Unit\SimpleFbConnectPostLoginManagerTest::setUp()
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ SimpleFbConnectPostLoginManagerTest.php, line 23
Class
- SimpleFbConnectPostLoginManagerTest
- @coversDefaultClass Drupal\simple_fb_connect\SimpleFbConnectPostLoginManager @group simple_fb_connect
Namespace
Drupal\Tests\simple_fb_connect\UnitCode
protected function setUp() {
parent::setUp();
$this->configFactory = $this
->getConfigFactoryStub([
'simple_fb_connect.settings' => [
'post_login_path' => '<front>',
],
]);
$this->requestContext = $this
->getMock('Drupal\\Core\\Routing\\RequestContext');
$this->pathValidator = $this
->getMockBuilder('Drupal\\Core\\Path\\PathValidatorInterface')
->disableOriginalConstructor()
->setMethods([
'getUrlIfValid',
'toString',
])
->getMockForAbstractClass();
$this->persistentDataHandler = $this
->getMockBuilder('Drupal\\simple_fb_connect\\SimpleFbConnectPersistentDataHandler')
->disableOriginalConstructor()
->getMock();
$this->postLoginManager = new SimpleFbConnectPostLoginManager($this->configFactory, $this->requestContext, $this->pathValidator, $this->persistentDataHandler);
}