public function testSlugIsValid() { $pattern = '/^[a-z0-9-]+$/'; $slug = $this->faker->slug(); $this->assertSame(preg_match($pattern, $slug), 1); }