@@ 197-208 (lines=12) @@ | ||
194 | $this->assertEquals(['name'=>'Foo'], $persister->expandParameters(['name'=>'Foo'])); |
|
195 | } |
|
196 | ||
197 | public function testInvokeExpandCriteriaParameters() |
|
198 | { |
|
199 | $persister = $this->createPersisterDefault(); |
|
200 | $criteria = new Criteria(); |
|
201 | ||
202 | $this->entityPersister->expects($this->once()) |
|
203 | ->method('expandCriteriaParameters') |
|
204 | ->with($this->equalTo($criteria)) |
|
205 | ->will($this->returnValue(['name'=>'Foo'])); |
|
206 | ||
207 | $this->assertEquals(['name'=>'Foo'], $persister->expandCriteriaParameters($criteria)); |
|
208 | } |
|
209 | ||
210 | public function testInvokeSelectConditionStatementSQL() |
|
211 | { |
|
@@ 312-323 (lines=12) @@ | ||
309 | $this->assertEquals([$entity], $persister->loadAll(['id' => 1], [0], 1, 2)); |
|
310 | } |
|
311 | ||
312 | public function testInvokeLoadById() |
|
313 | { |
|
314 | $persister = $this->createPersisterDefault(); |
|
315 | $entity = new Country("Foo"); |
|
316 | ||
317 | $this->entityPersister->expects($this->once()) |
|
318 | ->method('loadById') |
|
319 | ->with($this->equalTo(['id' => 1]), $this->equalTo($entity)) |
|
320 | ->will($this->returnValue($entity)); |
|
321 | ||
322 | $this->assertEquals($entity, $persister->loadById(['id' => 1], $entity)); |
|
323 | } |
|
324 | ||
325 | public function testInvokeLoadOneToOneEntity() |
|
326 | { |