select(); $this->assertInstanceOf('Alert\LibeventReactor', $reactor); } else { $this->markTestSkipped( 'ext/libevent extension not loaded' ); } } public function testMagicInvokeDelegatesToSelectMethod() { $rf = $this->getMock('Alert\ReactorFactory', ['select']); $rf->expects($this->once()) ->method('select') ->will($this->returnValue(42)); $this->assertEquals(42, $rf->__invoke()); } }