public function slug($str) { if (is_array($str)) { $str = implode(' ', $str); } return $this->app['slugify']->slugify($str); }
public function testSlugArray() { $app = $this->getApp(); $handler = new TextHandler($app); $slug = ['Köala & Clippy', 'úp thé trèé']; $result = $handler->slug($slug); $this->assertSame('koeala-clippy-up-the-tree', $result); }