Cviebrock\EloquentSluggable\Tests\OnUpdateTests::testSlugDoesntChangeWithoutOnUpdate PHP Метод

testSlugDoesntChangeWithoutOnUpdate() публичный Метод

Test that the slug isn't regenerated if onUpdate is false.
    public function testSlugDoesntChangeWithoutOnUpdate()
    {
        $post = Post::create(['title' => 'My First Post']);
        $post->save();
        $this->assertEquals('my-first-post', $post->slug);
        $post->update(['title' => 'A New Title']);
        $this->assertEquals('my-first-post', $post->slug);
    }