Skip to content

Commit 9db7e70

Browse files
committed
test(ocm): adapt DiscoveryServiceTest to OCMCapabilities return type
getCapabilities() now returns an OCMCapabilities object rather than an array; call ->toArray() before array_diff(). Signed-off-by: Micke Nordin <kano@sunet.se>
1 parent 64ab6d1 commit 9db7e70

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/lib/OCM/DiscoveryServiceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function testOCMRequest(string $path, int $expectedStatus, ?array $expect
125125

126126
public function testLocalBaseCapability(): void {
127127
$local = $this->discoveryService->getLocalOCMProvider();
128-
$this->assertEmpty(array_diff(['notifications', 'shares'], $local->getCapabilities()));
128+
$this->assertEmpty(array_diff(['notifications', 'shares'], $local->getCapabilities()->toArray()));
129129
}
130130

131131
public function testLocalCapabilitiesAdvertiseHttpSigByDefault(): void {
@@ -140,7 +140,7 @@ public function testLocalAddedCapability(): void {
140140
$this->context->for('ocm-capability-app')->registerEventListener(LocalOCMDiscoveryEvent::class, LocalOCMDiscoveryTestEvent::class);
141141
$this->context->delegateEventListenerRegistrations($this->dispatcher);
142142
$local = $this->discoveryService->getLocalOCMProvider();
143-
$this->assertEmpty(array_diff(['notifications', 'shares', 'ocm-capability-test'], $local->getCapabilities()));
143+
$this->assertEmpty(array_diff(['notifications', 'shares', 'ocm-capability-test'], $local->getCapabilities()->toArray()));
144144
}
145145

146146
}

0 commit comments

Comments
 (0)