/** * @depends testCallValuePassing */ public function testCallPassingTypeWithCallback() { $scope = new Scope(); $scope->callback('test', function () { return new \Exception(); }, 'Exception'); $scope->call(function (\Exception $x) { $this->assertInstanceOf('Exception', $x); }); }