// test: instanceof narrows to intersection when narrowing target is an unrelated interface
// feature: completion
// expect: canBeRefunded(
// expect: shouldReceive(
---
<?php
interface MockInterface {
public function shouldReceive(string $name): self;
}
class MolliePayment {
public function canBeRefunded(): bool { return true; }
}
class TestCase {
public function getPayment(): MolliePayment {}
public function test(): void {
$payment = $this->getPayment();
assert($payment instanceof MockInterface);
$payment-><>
}
}