public function testCreateFromSpecWithClosure() { $this->expectException(\Exception::class); $this->expectExceptionMessage('Creating by closure is not supported yet'); ReflectionParameter::createFromSpec(function ($a) { }, 'a'); }