public function test__call() { $conn = null; $this->given($wrapper = new TestedClass($conn))->exception(function () use($wrapper) { $wrapper->doNotExist(); })->isInstanceOf('\\FtpClient\\FtpException')->isInstanceOf('\\Exception')->variable(array($wrapper, 'alloc'))->isCallable(); }