/** * @param string $string * * @throws \Exception * @author Fabian Köstring */ function __invoke(string $string) { return $this->urlService->create($string); }
/** * @author Fabian Köstring */ public function testCreateWillRemoveDashFromBeginningAndEnd() { $service = new UrlService(new Config(['seperator' => '-'])); $this->assertEquals('just-a-test', $service->create('-just a test-')); }