Пример #1
0
 /**
  * Test that we generate unique slugs in a static context.
  *
  * @test
  */
 public function testStaticSlugGeneratorWhenEntriesExist()
 {
     $post = Post::create(['title' => 'My Test Post']);
     $this->assertEquals('my-test-post', $post->slug);
     $slug = SlugService::createSlug(Post::class, 'slug', 'My Test Post');
     $this->assertEquals('my-test-post-1', $slug);
 }