Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function testExecute(): void |
||
32 | { |
||
33 | $helper = $this->prophesize(FacebookRedirectLoginHelper::class); |
||
34 | $helper->getLoginUrl('/start', ['DUMMY_PERMISSION']) |
||
35 | ->willReturn('https://facebook/login') |
||
36 | ; |
||
37 | |||
38 | $this->facebook->getRedirectLoginHelper() |
||
39 | ->willReturn($helper) |
||
40 | ; |
||
41 | |||
42 | $this->router->generate('core23_facebook_check', [], UrlGeneratorInterface::ABSOLUTE_URL) |
||
43 | ->willReturn('/start') |
||
44 | ->shouldBeCalled() |
||
45 | ; |
||
46 | |||
47 | $action = new StartAuthAction( |
||
48 | $this->router->reveal(), |
||
49 | $this->facebook->reveal(), |
||
50 | ['DUMMY_PERMISSION'] |
||
51 | ); |
||
52 | |||
53 | $this->assertSame('https://facebook/login', $action()->getTargetUrl()); |
||
54 | } |
||
55 | } |
||
56 |