Exemplo n.º 1
0
 /**
  * Get a safe cache key.
  *
  * @return string The cache key
  */
 private function cacheKey()
 {
     return 'views.' . Str::slug($this->name);
 }
Exemplo n.º 2
0
 /**
  * Tests conversion of naughty strings to slugs.
  *
  * @dataProvider bigListOfNaughtyStrings
  *
  * @covers Molovo\Str\Str::slug
  */
 public function testSlugWithNaughtyStrings($string)
 {
     $string = Str::slug(base64_decode($string));
     if (!empty($string)) {
         verify($string)->regExp('/[a-zA-Z0-9-]/');
     }
 }