@@ 65-77 (lines=13) @@ | ||
62 | static::assertNull($manager->getUsername()); |
|
63 | } |
|
64 | ||
65 | public function testStore(): void |
|
66 | { |
|
67 | $facebookSession = new FacebookSession('4711', 'YourName', 'YourToken', new DateTime()); |
|
68 | ||
69 | $session = $this->prophesize(Session::class); |
|
70 | $session->set('_CORE23_FACEBOOK_ID', '4711')->shouldBeCalled(); |
|
71 | $session->set('_CORE23_FACEBOOK_NAME', 'YourName')->shouldBeCalled(); |
|
72 | $session->set('_CORE23_FACEBOOK_TOKEN', 'YourToken')->shouldBeCalled(); |
|
73 | $session->set('_CORE23_FACEBOOK_EXPIRES', Argument::type(DateTime::class))->shouldBeCalled(); |
|
74 | ||
75 | $manager = new SessionManager($session->reveal()); |
|
76 | $manager->store($facebookSession); |
|
77 | } |
|
78 | ||
79 | public function testStoreWithNoExpiryDate(): void |
|
80 | { |
|
@@ 79-91 (lines=13) @@ | ||
76 | $manager->store($facebookSession); |
|
77 | } |
|
78 | ||
79 | public function testStoreWithNoExpiryDate(): void |
|
80 | { |
|
81 | $facebookSession = new FacebookSession('4711', 'YourName', 'YourToken', null); |
|
82 | ||
83 | $session = $this->prophesize(Session::class); |
|
84 | $session->set('_CORE23_FACEBOOK_ID', '4711')->shouldBeCalled(); |
|
85 | $session->set('_CORE23_FACEBOOK_NAME', 'YourName')->shouldBeCalled(); |
|
86 | $session->set('_CORE23_FACEBOOK_TOKEN', 'YourToken')->shouldBeCalled(); |
|
87 | $session->set('_CORE23_FACEBOOK_EXPIRES', Argument::is(null))->shouldBeCalled(); |
|
88 | ||
89 | $manager = new SessionManager($session->reveal()); |
|
90 | $manager->store($facebookSession); |
|
91 | } |
|
92 | ||
93 | public function testClear(): void |
|
94 | { |