public function resolveOperationPath(string $resourceShortName, array $operation, bool $collection) : string
{
$path = '/' . Inflector::pluralize(Inflector::tableize($resourceShortName));
if (!$collection) {
$path .= '/{id}';
}
$path .= '.{_format}';
return $path;
}
public function testResolveCollectionOperationPath() { $underscoreOperationPathResolver = new UnderscoreOperationPathResolver(); $this->assertSame('/short_names.{_format}', $underscoreOperationPathResolver->resolveOperationPath('ShortName', [], true)); }