public function SimpleFbConnectPostLoginManagerTest::testGetPostLoginPathWithValidQueryParameter in Simple FB Connect 8.2
Same name and namespace in other branches
- 8.3 tests/src/Unit/SimpleFbConnectPostLoginManagerTest.php \Drupal\Tests\simple_fb_connect\Unit\SimpleFbConnectPostLoginManagerTest::testGetPostLoginPathWithValidQueryParameter()
Tests getPostLoginPath method with valid query parameter.
@covers ::getPostLoginPath @covers ::validateInternalPath
File
- tests/
src/ Unit/ SimpleFbConnectPostLoginManagerTest.php, line 96 - Contains Drupal\Tests\simple_fb_connect\Unit\SimpleFbConnectPostLoginManagerTest.
Class
- SimpleFbConnectPostLoginManagerTest
- @coversDefaultClass Drupal\simple_fb_connect\SimpleFbConnectPostLoginManager @group simple_fb_connect
Namespace
Drupal\Tests\simple_fb_connect\UnitCode
public function testGetPostLoginPathWithValidQueryParameter() {
$query_path = 'node/1';
$query_url = $this
->generateStubUrl(FALSE, $query_path);
$this->session
->expects($this
->once())
->method('get')
->with('simple_fb_connect_post_login_path')
->willReturn($query_path);
$this->pathValidator
->expects($this
->once())
->method('getUrlIfValid')
->willReturn($query_url);
$this
->assertEquals($query_path, $this->postLoginManager
->getPostLoginPath());
}