Also removed check for 'mb_' functions since mbstring is a dependancy
*/
protected function nameToSlug($name)
{
- $slug = str_replace(' ', '-', function_exists('mb_strtolower') ? mb_strtolower($name) : strtolower($name));
+ $slug = str_replace(' ', '-', mb_strtolower($name));
$slug = preg_replace('/[\+\/\\\?\@\}\{\.\,\=\[\]\#\&\!\*\'\;\:\$\%]/', '', $slug);
if ($slug === "") $slug = substr(md5(rand(1, 500)), 0, 5);
return $slug;
->seeInElement('#recently-updated-pages', $page->name);
}
+ public function test_slug_multi_byte_lower_casing()
+ {
+ $entityRepo = app(EntityRepo::class);
+ $book = $entityRepo->createFromInput('book', [
+ 'name' => 'КНИГА'
+ ]);
+
+ $this->assertEquals('книга', $book->slug);
+ }
+
+
}