/** * @test * @covers ::result */ public function it_should_retrieve_results_as_an_instance_of_a_value_object_when_no_partition_is_provided() { $this->proxy->shouldReceive('query')->once()->withArgs([self::EXAMPLE_PROJECTION_NAME, null])->andReturn(['something']); $this->resultSerializer->shouldReceive('unserialize')->once()->with(self::EXAMPLE_CLASS_NAME, ['something'])->andReturn('something else'); $this->assertSame('something else', $this->repository->result()); }
private function thenSerializerTransformsResultIntoAValueObject($className, $result, $expected) { $this->resultSerializer->shouldReceive('unserialize')->once()->with($className, $result)->andReturn($expected); }