public function testToJson() { $this->transfer->shouldReceive('getProperties')->andReturn(['prop' => ['is_multiple' => false], 'not_in_data' => ['is_multiple' => false]]); $data = ['prop' => 'hello']; $this->transfer->fromArray($data); $result = json_encode($this->transfer); $this->assertJson($result); }