public function testUrlify() { $this->assertEquals("simple-test-case", $this->object->urlify("This is a simple test case")); $this->assertEquals('jetudie-le-francais', $this->object->urlify(' J\'étudie le français ')); $this->assertEquals('lo-siento-no-hablo-espanol', $this->object->urlify('Lo siento, no hablo español.')); $this->assertEquals('f3pws', $this->object->urlify('ΦΞΠΏΣ')); $this->assertEquals('yo-hablo-espanol', $this->object->urlify('¿Yo hablo español?')); // Test for many rounds with a language, that has no map associated // This causes a "regular expression is too large" error on old versions for ($i = 0; $i < 1000; $i++) { $this->object->urlify('Lo siento, no hablo español.', 60, -1); } }
/** * Test for many rounds with a language, that has no map associated * This causes a "regular expression is too large" error on old versions */ public function testUrlify_regexTooLarge() { for ($i = 0; $i < 1000; $i++) { $this->object->urlify('Lo siento, no hablo español.', 60, -1); } }