/** * @param InflectorDefinition $definition * * @return Closure */ private function createInflector(InflectorDefinition $definition) { return function ($subject) use($definition) { foreach ($definition->getMethods() as $method => $arguments) { $subject->{$method}(...$this->resolveArguments($arguments)); } }; }
/** * @param InflectorDefinition $definition */ private function configureInterface(InflectorDefinition $definition) { foreach ($definition->getMethods() as $method => $args) { $this->addInflectorMethod($definition->getInterface(), $method, $args); } }
public function testGetMethodsReturnsTheMethods() { assertEquals(['method1' => ['arg1', 'arg2']], $this->subject->getMethods()); }