| @@ 52-65 (lines=14) @@ | ||
| 49 | $this->manager = new TerminalManager($managerRegistry, 'Loevgaard\DandomainAltapayBundle\Entity\Terminal'); |
|
| 50 | } |
|
| 51 | ||
| 52 | public function testFindTerminalByTitle() |
|
| 53 | { |
|
| 54 | $terminal = $this->getTerminal(); |
|
| 55 | ||
| 56 | $this->objectRepository |
|
| 57 | ->expects($this->any()) |
|
| 58 | ->method('findOneBy') |
|
| 59 | ->with(['title' => 'terminal']) |
|
| 60 | ->willReturn($terminal) |
|
| 61 | ; |
|
| 62 | ||
| 63 | $res = $this->manager->findTerminalByTitle('terminal'); |
|
| 64 | $this->assertInstanceOf(TerminalInterface::class, $res); |
|
| 65 | } |
|
| 66 | ||
| 67 | public function testFindTerminalBySlug() |
|
| 68 | { |
|
| @@ 67-80 (lines=14) @@ | ||
| 64 | $this->assertInstanceOf(TerminalInterface::class, $res); |
|
| 65 | } |
|
| 66 | ||
| 67 | public function testFindTerminalBySlug() |
|
| 68 | { |
|
| 69 | $terminal = $this->getTerminal(); |
|
| 70 | ||
| 71 | $this->objectRepository |
|
| 72 | ->expects($this->any()) |
|
| 73 | ->method('findOneBy') |
|
| 74 | ->with(['slug' => 'terminal']) |
|
| 75 | ->willReturn($terminal) |
|
| 76 | ; |
|
| 77 | ||
| 78 | $res = $this->manager->findTerminalBySlug('terminal'); |
|
| 79 | $this->assertInstanceOf(TerminalInterface::class, $res); |
|
| 80 | } |
|
| 81 | ||
| 82 | /** |
|
| 83 | * @return TerminalInterface|\PHPUnit_Framework_MockObject_MockObject |
|