PHP Class Cviebrock\EloquentSluggable\Tests\OnUpdateTests

Inheritance: extends TestCase
Show file Open project: cviebrock/eloquent-sluggable

Public Methods

Method Description
testSlugDoesChangeWhenEmptiedManually ( ) Test that the slug is regenerated if the field is emptied manually.
testSlugDoesChangeWithOnUpdate ( ) Test that the slug is regenerated if onUpdate is true.
testSlugDoesNotChangeIfSourceDoesNotChange ( ) Test that the slug is not regenerated if onUpdate is true but the source fields didn't change.
testSlugDoesNotChangeIfSourceDoesNotChangeMultiple ( ) Test that the slug is not regenerated if onUpdate is true but the source fields didn't change, even with multiple increments of the same slug.
testSlugDoesntChangeWithoutOnUpdate ( ) Test that the slug isn't regenerated if onUpdate is false.

Method Details

testSlugDoesChangeWhenEmptiedManually() public method

Test that the slug is regenerated if the field is emptied manually.

testSlugDoesChangeWithOnUpdate() public method

Test that the slug is regenerated if onUpdate is true.

testSlugDoesNotChangeIfSourceDoesNotChange() public method

Test that the slug is not regenerated if onUpdate is true but the source fields didn't change.

testSlugDoesNotChangeIfSourceDoesNotChangeMultiple() public method

Test that the slug is not regenerated if onUpdate is true but the source fields didn't change, even with multiple increments of the same slug.
See also: https://github.com/cviebrock/eloquent-sluggable/issues/317

testSlugDoesntChangeWithoutOnUpdate() public method

Test that the slug isn't regenerated if onUpdate is false.