Наследование: extends Cviebrock\EloquentSluggable\Tests\Models\Post
Пример #1
0
 /**
  * Test for max_length option with increments
  *
  * @test
  */
 public function testMaxLengthWithIncrements()
 {
     for ($i = 0; $i < 20; $i++) {
         $post = PostWithMaxLength::create(['title' => 'A post with a really long title']);
         if ($i == 0) {
             $this->assertEquals('a-post-wit', $post->slug);
         } elseif ($i < 10) {
             $this->assertEquals('a-post-wit-' . $i, $post->slug);
         }
     }
 }