slugify = new Slugify(); $this->viewHelper = new SlugifyViewHelper($this->slugify); } /** * @test * @covers Cocur\Slugify\Bridge\ZF2\SlugifyViewHelper::__invoke() */ public function invoke() { $actual = 'Hällo Wörld'; $expected = call_user_func($this->viewHelper, $actual); $this->assertEquals($expected, $this->slugify->slugify($actual)); $expected = call_user_func($this->viewHelper, $actual, '_'); $this->assertEquals($expected, $this->slugify->slugify($actual, '_')); } }