public function testGet() { $customer = $this->prophesize(Customer::class); $this->storage->findOneBy(array('id' => 123))->willReturn($customer); $found = $this->object->get(123); $this->assertSame($customer->reveal(), $found); }
public function testFindOneBy() { $result = $this->createEventProphet()->reveal(); $criteria = ['id' => 1234]; $this->storage->findOneBy($criteria)->willReturn($result); self::assertSame($result, $this->object->findOneBy($criteria, 10, 5)); }