assertEquals(false, $trap->isTrapped()); posix_kill(posix_getpid(), SIGUSR1); usleep(1000); $this->assertEquals(true, $trap->isTrapped()); $this->assertEquals(false, $trap->isTrapped()); } public function testSignalTrapWithoutResetting() { $trap = new SignalTrap(SIGUSR1); $this->assertEquals(false, $trap->isTrapped()); posix_kill(posix_getpid(), SIGUSR1); usleep(1000); $this->assertEquals(true, $trap->isTrapped(false)); $this->assertEquals(true, $trap->isTrapped()); } }