Skip to content

Instantly share code, notes, and snippets.

@xicond
Created November 22, 2017 19:40
Show Gist options
  • Save xicond/f5949c87a8ad4b384f9cc1bb891fa00c to your computer and use it in GitHub Desktop.
Save xicond/f5949c87a8ad4b384f9cc1bb891fa00c to your computer and use it in GitHub Desktop.
public function testSlugifyDashSpace() {
$faker = Faker\Factory::create();
$faker->addProvider(new Faker\Provider\Lorem($faker));
$str1 = $faker->word;
$str2 = $faker->word;
$this->assertEquals($str1.' '.$str2, TextHelper::slugifyDashSpace($str1.' '.$str2));
Yii::$app->params['slugifyDashSpace'][Yii::$app->params['projectCode']] = true;
$this->assertEquals($str1.' '.$str2, TextHelper::slugifyDashSpace($str1.'-'.$str2));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment