| @@ 86-94 (lines=9) @@ | ||
| 83 | /** |
|
| 84 | * @test |
|
| 85 | */ |
|
| 86 | public function shouldPersistEntity() |
|
| 87 | { |
|
| 88 | /** @var stdClass $entity */ |
|
| 89 | $entity = $this->createMock(stdClass::class); |
|
| 90 | ||
| 91 | $this->entityManager->expects($this->once())->method('persist')->with($this->identicalTo($entity)); |
|
| 92 | ||
| 93 | $this->controllerHelper->persistEntity($entity); |
|
| 94 | } |
|
| 95 | ||
| 96 | /** |
|
| 97 | * @test |
|
| @@ 99-107 (lines=9) @@ | ||
| 96 | /** |
|
| 97 | * @test |
|
| 98 | */ |
|
| 99 | public function shouldRemoveEntity() |
|
| 100 | { |
|
| 101 | /** @var stdClass $entity */ |
|
| 102 | $entity = $this->createMock(stdClass::class); |
|
| 103 | ||
| 104 | $this->entityManager->expects($this->once())->method('remove')->with($this->identicalTo($entity)); |
|
| 105 | ||
| 106 | $this->controllerHelper->removeEntity($entity); |
|
| 107 | } |
|
| 108 | ||
| 109 | /** |
|
| 110 | * @test |
|