markTestSkipped('ext-sockets (socket_create_pair / socket_export_stream) not available'); } } public function test_reports_support_on_this_platform(): void { $this->assertTrue(SocketPairIpc::isSupported()); } public function test_create_returns_an_unconfigured_instance(): void { $ipc = SocketPairIpc::create(new StreamSelectLoop); $this->assertInstanceOf(SocketPairIpc::class, $ipc); } public function test_double_configuration_is_rejected(): void { $ipc = SocketPairIpc::create(new StreamSelectLoop); $ipc->setupChild(); $this->expectException(\LogicException::class); $ipc->setupChild(); } public function test_send_from_a_non_child_is_rejected(): void { $ipc = SocketPairIpc::create(new StreamSelectLoop); // Not configured as child -> sendToParent must refuse. $this->expectException(\LogicException::class); $ipc->sendToParent('nope'); } }