PHP Class Cviebrock\EloquentSluggable\Tests\ScopeHelperTests

Inheritance: extends TestCase
Datei anzeigen Open project: cviebrock/eloquent-sluggable

Public Methods

Method Description
testFindBySlug ( ) Test finding a model by its primary slug.
testFindBySlugOrFail ( ) Test finding a model by its primary slug throws an exception if the slug does not exist.
testFindBySlugReturnsNullForNoRecord ( ) Test finding a model by its primary slug fails if the slug does not exist.
testFirstSlugAsFallback ( ) Test primary slug is set to first defined slug if $model->slugKeyName is not set.
testGetSlugKeyNameWithShortConfig ( ) Test that getSlugKeyName() works with the short configuration syntax.
testQueryScope ( ) Test primary slug query scope.
testSlugKeyNameProperty ( ) Test that primary slug is set to $model->slugKeyName when set.

Method Details

testFindBySlug() public method

Test finding a model by its primary slug.
public testFindBySlug ( )

testFindBySlugOrFail() public method

Test finding a model by its primary slug throws an exception if the slug does not exist.

testFindBySlugReturnsNullForNoRecord() public method

Test finding a model by its primary slug fails if the slug does not exist.

testFirstSlugAsFallback() public method

Test primary slug is set to first defined slug if $model->slugKeyName is not set.

testGetSlugKeyNameWithShortConfig() public method

Test that getSlugKeyName() works with the short configuration syntax.

testQueryScope() public method

Test primary slug query scope.
public testQueryScope ( )

testSlugKeyNameProperty() public method

Test that primary slug is set to $model->slugKeyName when set.