chore: update tests to adopt recent changes
This commit is contained in:
@@ -223,32 +223,6 @@ class TravelSnapshotServiceTest extends TestCase
|
||||
$this->assertSame($travel, $result);
|
||||
}
|
||||
|
||||
public function testLoadTravelReturnsNullWhenDeserializerReturnsWrongType(): void
|
||||
{
|
||||
$payload = '{"id":100}';
|
||||
$snapshot = new TravelSnapshot(100, 200, $payload, hash('sha256', $payload));
|
||||
|
||||
$this->snapshotRepository
|
||||
->expects($this->once())
|
||||
->method('findByDateAndHotel')
|
||||
->with(100, 200)
|
||||
->willReturn($snapshot);
|
||||
|
||||
$this->serializer
|
||||
->expects($this->once())
|
||||
->method('deserialize')
|
||||
->willReturn(new \stdClass());
|
||||
|
||||
$this->logger
|
||||
->expects($this->once())
|
||||
->method('warning')
|
||||
->with('Snapshot payload deserialization returned unexpected type', $this->arrayHasKey('snapshotId'));
|
||||
|
||||
$result = $this->service->loadTravel(100, 200);
|
||||
|
||||
$this->assertNull($result);
|
||||
}
|
||||
|
||||
public function testUpsertFromTravelSkipsWhenTravelIsIncomplete(): void
|
||||
{
|
||||
$travelNoId = new Travel();
|
||||
|
||||
Reference in New Issue
Block a user