| @@ 110-120 (lines=11) @@ | ||
| 107 | /** |
|
| 108 | * @test |
|
| 109 | */ |
|
| 110 | public function it_create_token() |
|
| 111 | { |
|
| 112 | $token = new Token('string', 'jdoe','unique', 'init_password', '+1 day', []); |
|
| 113 | ||
| 114 | $this->manager->persist($token) |
|
| 115 | ->shouldBeCalledTimes(1); |
|
| 116 | $this->manager->flush($token) |
|
| 117 | ->shouldBeCalledTimes(1); |
|
| 118 | ||
| 119 | $this->repository()->create($token); |
|
| 120 | } |
|
| 121 | ||
| 122 | /** |
|
| 123 | * @test |
|
| @@ 125-135 (lines=11) @@ | ||
| 122 | /** |
|
| 123 | * @test |
|
| 124 | */ |
|
| 125 | public function it_update_token() |
|
| 126 | { |
|
| 127 | $token = new Token('string', 'jdoe','unique', 'init_password', '+1 day', []); |
|
| 128 | ||
| 129 | $this->manager->persist($token) |
|
| 130 | ->shouldBeCalledTimes(1); |
|
| 131 | $this->manager->flush($token) |
|
| 132 | ->shouldBeCalledTimes(1); |
|
| 133 | ||
| 134 | $this->repository()->update($token); |
|
| 135 | } |
|
| 136 | } |
|
| 137 | ||