public function SimpleFbConnectPostLoginManagerTest::testGetPathToUserForm 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::testGetPathToUserForm()
Tests the getPathToUserForm() method.
@covers ::getPathToUserForm
File
- tests/
src/ Unit/ SimpleFbConnectPostLoginManagerTest.php, line 186
Class
- SimpleFbConnectPostLoginManagerTest
- @coversDefaultClass Drupal\simple_fb_connect\SimpleFbConnectPostLoginManager @group simple_fb_connect
Namespace
Drupal\Tests\simple_fb_connect\UnitCode
public function testGetPathToUserForm() {
$user = $this
->getMockBuilder('Drupal\\user\\Entity\\User')
->disableOriginalConstructor()
->getMock();
$user
->expects($this
->any())
->method('id')
->willReturn('1');
$this->pathValidator
->expects($this
->once())
->method('getUrlIfValid')
->willReturn($this->pathValidator);
$this->pathValidator
->expects($this
->once())
->method('toString')
->willReturn('user/1/edit');
$this
->assertEquals('user/1/edit', $this->postLoginManager
->getPathToUserForm($user));
}