diff --git a/.github/workflows/phpunit-test.yml b/.github/workflows/phpunit-test.yml index 9a69150..a5b2393 100644 --- a/.github/workflows/phpunit-test.yml +++ b/.github/workflows/phpunit-test.yml @@ -73,7 +73,7 @@ jobs: strategy: matrix: - php-versions: ['8.2', '${{ needs.matrix.outputs.php-max }}'] + php-versions: ['8.3', '${{ needs.matrix.outputs.php-max }}'] server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }} name: Unit PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }} diff --git a/tests/php/unit/Providers/DAV/Calendar/Hybrid/EventCollectionTest.php b/tests/php/unit/Providers/DAV/Calendar/Hybrid/EventCollectionTest.php index 96493fa..d06d105 100644 --- a/tests/php/unit/Providers/DAV/Calendar/Hybrid/EventCollectionTest.php +++ b/tests/php/unit/Providers/DAV/Calendar/Hybrid/EventCollectionTest.php @@ -71,12 +71,12 @@ public function testGetChildByUuid(): void { $this->localService->expects($this->once()) ->method('entityList') ->willReturnCallback(function (EventFilter $filter) use ($entity): array { - // the .ics extension is stripped before the uuid lookup + // the full resource name is used for the uuid lookup $this->assertSame('entity-uuid', $this->conditionValue($filter, 'uuid')); return [$entity]; }); - $child = $this->sut->getChild('entity-uuid.ics'); + $child = $this->sut->getChild('entity-uuid'); $this->assertInstanceOf(EventEntity::class, $child); $this->assertSame('entity-uuid', $child->getName()); @@ -91,15 +91,15 @@ public function testGetChildFallsBackToRemoteEntityId(): void { ->method('entityList') ->willReturnCallback(function (EventFilter $filter) use ($entity): array { // uuid lookup yields nothing, ceid lookup resolves the entity by - // the reconstructed full resource path (extension preserved) + // the remote id prefixed with the collection remote id if ($this->conditionValue($filter, 'uuid') === 'submitted-id') { return []; } - $this->assertSame('/remote/Calendar/submitted-id.ics', $this->conditionValue($filter, 'ceid')); + $this->assertSame('/remote/Calendar/submitted-id', $this->conditionValue($filter, 'ceid')); return [$entity]; }); - $child = $this->sut->getChild('submitted-id.ics'); + $child = $this->sut->getChild('submitted-id'); $this->assertInstanceOf(EventEntity::class, $child); $this->assertSame('entity-uuid', $child->getName()); @@ -123,7 +123,7 @@ public function testChildExistsByUuid(): void { return [new Entity()]; }); - $this->assertTrue($this->sut->childExists('entity-uuid.ics')); + $this->assertTrue($this->sut->childExists('entity-uuid')); } public function testChildExistsFallsBackToRemoteEntityId(): void { @@ -133,11 +133,11 @@ public function testChildExistsFallsBackToRemoteEntityId(): void { if ($this->conditionValue($filter, 'uuid') === 'submitted-id') { return []; } - $this->assertSame('/remote/Calendar/submitted-id.ics', $this->conditionValue($filter, 'ceid')); + $this->assertSame('/remote/Calendar/submitted-id', $this->conditionValue($filter, 'ceid')); return [new Entity()]; }); - $this->assertTrue($this->sut->childExists('submitted-id.ics')); + $this->assertTrue($this->sut->childExists('submitted-id')); } public function testChildExistsReturnsFalseWhenMissing(): void {