PHP Class Tools\Test\TestCase\Model\Behavior\SluggedBehaviorTest

Inheritance: extends Tools\TestSuite\TestCase
Show file Open project: dereuromark/cakephp-tools

Public Properties

Property Type Description
$fixtures array Fixture

Public Methods

Method Description
setUp ( ) : void setup
tearDown ( ) : void teardown
testAdd ( ) : void Testing simple slugging when adding a record
testAddUnique ( ) : void Testing simple slugging when adding a record
testAddUniqueMultipleLabels ( ) : void
testCustomFinder ( ) : void SluggedBehaviorTest::testCustomFinder()
testDuplicateWithLengthRestriction ( ) : void TestDuplicateWithLengthRestriction method
testFieldList ( ) : void Test that fieldList doesnt mess with slug storing.
testLengthRestrictionAutoDetect ( ) : void Length based on auto-detect of schema.
testLengthRestrictionManual ( ) : void Length based on manual config.
testLengthRestrictionNoLimit ( ) : void Ensure that you can overwrite length.
testNeedsSlugUpdate ( ) : void Tests needSlugUpdate()
testNeedsSlugUpdateDeep ( ) : void Tests needSlugUpdate() with deep
testResetSlugs ( ) : void SluggedBehaviorTest::testResetSlugs()
testSlugDynamicOverwrite ( ) : void Test dynamic slug overwrite
testSlugGenerationBeforeSave ( ) : void Test slug generation/update on beforeSave
testSlugGenerationI18nReplacementPieces ( ) : void Test slug generation with i18n replacement pieces
testSlugGenerationModeAscii ( ) : void Test slug with ascii
testSlugGenerationWithScope ( ) : void Test slug generation/update based on scope
testSlugGenerationWithVirualField ( ) : void Test slug generation works with virtual fields.
testSlugManualSave ( ) : void Tests that manual slugging works.
testTruncateMultibyte ( ) : void TestTruncateMultibyte method
testUrlMode ( ) : void Test Url method

Protected Methods

Method Description
_getEntity ( string | null $title = null, string | null $field = null, array $data = [], array $options = [] ) : Cake\ORM\Entity Get a new Entity

Method Details

_getEntity() protected method

Get a new Entity
protected _getEntity ( string | null $title = null, string | null $field = null, array $data = [], array $options = [] ) : Cake\ORM\Entity
$title string | null
$field string | null
$data array
$options array
return Cake\ORM\Entity

setUp() public method

setup
public setUp ( ) : void
return void

tearDown() public method

teardown
public tearDown ( ) : void
return void

testAdd() public method

Testing simple slugging when adding a record
public testAdd ( ) : void
return void

testAddUnique() public method

Testing simple slugging when adding a record
public testAddUnique ( ) : void
return void

testAddUniqueMultipleLabels() public method

public testAddUniqueMultipleLabels ( ) : void
return void

testCustomFinder() public method

SluggedBehaviorTest::testCustomFinder()
public testCustomFinder ( ) : void
return void

testDuplicateWithLengthRestriction() public method

If there's a length restriction - ensure it's respected by the unique slug routine

testFieldList() public method

Test that fieldList doesnt mess with slug storing.
public testFieldList ( ) : void
return void

testLengthRestrictionAutoDetect() public method

Length based on auto-detect of schema.

testLengthRestrictionManual() public method

Length based on manual config.
public testLengthRestrictionManual ( ) : void
return void

testLengthRestrictionNoLimit() public method

Ensure that you can overwrite length.
public testLengthRestrictionNoLimit ( ) : void
return void

testNeedsSlugUpdate() public method

Tests needSlugUpdate()
public testNeedsSlugUpdate ( ) : void
return void

testNeedsSlugUpdateDeep() public method

Tests needSlugUpdate() with deep
public testNeedsSlugUpdateDeep ( ) : void
return void

testResetSlugs() public method

SluggedBehaviorTest::testResetSlugs()
public testResetSlugs ( ) : void
return void

testSlugDynamicOverwrite() public method

Test dynamic slug overwrite
public testSlugDynamicOverwrite ( ) : void
return void

testSlugGenerationBeforeSave() public method

Test slug generation/update on beforeSave
public testSlugGenerationBeforeSave ( ) : void
return void

testSlugGenerationI18nReplacementPieces() public method

Test slug generation with i18n replacement pieces

testSlugGenerationModeAscii() public method

Test slug with ascii
public testSlugGenerationModeAscii ( ) : void
return void

testSlugGenerationWithScope() public method

Test slug generation/update based on scope
public testSlugGenerationWithScope ( ) : void
return void

testSlugGenerationWithVirualField() public method

Test slug generation works with virtual fields.

testSlugManualSave() public method

Tests that manual slugging works.
public testSlugManualSave ( ) : void
return void

testTruncateMultibyte() public method

Ensure that the first test doesn't cut a multibyte character The test string is: 17 chars 51 bytes UTF-8 encoded
public testTruncateMultibyte ( ) : void
return void

testUrlMode() public method

Test Url method
public testUrlMode ( ) : void
return void

Property Details

$fixtures public property

Fixture
public array $fixtures
return array