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