PHP Класс Crud\TestCase\Controller\Crud\CrudComponentTest

Наследование: extends Crud\TestSuite\TestCase
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$fixtures Use the core posts fixture to have something to work on. What fixture is used is almost irrelevant, was chosen as it is simple

Открытые методы

Метод Описание
setUp ( ) setUp
tearDown ( ) tearDown method
testAddListenerByNameAndClassName ( ) : void Test adding a listener by name and class name
testAddListenerOnlyClassName ( ) : void Test adding a listener only by class name
testAddListenerWithDefaults ( ) : void Test that addListener works - with listener default config
testAddListenerWithoutDefaults ( ) : void Test that addListener works - without listener default config
testConfigMergeWorks ( ) : void Test that it's possible to change just one sub key by providing all the parents, without loosing any default settings
testConfigNormalization ( ) : void Test config normalization
testConfigOverwrite ( ) : void Using $key and value, and specifying no merge should overwrite the value keys
testConstructMerging ( ) : void Test that providing configuration for a new listener in the Crud setting should preserve the defaults and add the new listener to the array
testConstructMerging2 ( ) : void Test that providing configuration for a new listener in the Crud setting should preserve the defaults and add the new listener to the array
testControllerWithEmptyUses ( ) : void Test the Crud sets model and modelClass to NULL if there is no model defined in the controller
testCrudWillComplainAboutUnmappedAction ( ) : void Test if crud complains about unmapped actions
testDefaultConfig ( ) : void Test the default configuration for CrudComponent
testDefaultsListenerNotAlreadyLoaded ( ) : void Test setting defaults for one listener works
testDefaultsMultipleActions ( ) : void Test setting defaults for multiple actions work
testDefaultsMultipleListeners ( ) : void Test setting defaults for multiple actions work
testDefaultsOnAction ( ) : void Test setting defaults for one action works
testDefaultsOneListener ( ) : void Test setting defaults for one listener works
testDisableAction ( ) testDisableAction
testEnable ( ) testEnable
testExecuteActionToExecute ( ) Test deprecated executeAction calls execute correctly
testFindMethodMultipleActions ( ) : void Test changing view var for multiple actions works
testIsActionMappedNo ( ) testIsActionMappedNo
testIsActionMappedYes ( ) testIsActionMappedYes
testLoadListener ( ) : void testLoadListener
testMapAction ( ) testMapAction
testMappingNonExistentAction ( ) : void testMappingNonExistentAction
testOn ( ) Tests on method registers an event
testOnWithPriPriority ( ) tests on method registers an event with extra params
testRemoveListener ( ) : void Test that removeListener works
testRemoveListenerNoExist ( ) : void Test removing a listener that doesn't exist should return false
testSetModelPropertiesDefault ( ) : void Test that having no mapped model for an action, just use the modelClass from the controller
testUseModel ( ) : void Tests that is possible to set the model class to use for the action
testView ( ) testView
testViewCanBeChangedInControllerAction ( ) : void Test that having a 'search' action in the controller and calling ->execute('index') will still render the 'search' view
testViewVarMultipleActions ( ) : void Test changing view var for multiple actions works
testViewVarSingleAction ( ) : void Test changing view var for one action works
testViewWithArrayIndexAction ( ) : void Test if view with array yields the expected result
testViewWithArrayNewAction ( ) : void Test if view with array yields the expected result

Описание методов

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

Setup the classes the crud component needs to be testable
public setUp ( )

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

tearDown method
public tearDown ( )

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

Test adding a listener by name and class name
public testAddListenerByNameAndClassName ( ) : void
Результат void

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

Test adding a listener only by class name
public testAddListenerOnlyClassName ( ) : void
Результат void

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

Test that addListener works - with listener default config
public testAddListenerWithDefaults ( ) : void
Результат void

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

Test that addListener works - without listener default config
public testAddListenerWithoutDefaults ( ) : void
Результат void

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

Test that it's possible to change just one sub key by providing all the parents, without loosing any default settings
public testConfigMergeWorks ( ) : void
Результат void

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

Test config normalization
public testConfigNormalization ( ) : void
Результат void

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

Using $key and value, and specifying no merge should overwrite the value keys
public testConfigOverwrite ( ) : void
Результат void

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

Test that providing configuration for a new listener in the Crud setting should preserve the defaults and add the new listener to the array
public testConstructMerging ( ) : void
Результат void

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

Test that providing configuration for a new listener in the Crud setting should preserve the defaults and add the new listener to the array
public testConstructMerging2 ( ) : void
Результат void

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

Test the Crud sets model and modelClass to NULL if there is no model defined in the controller
public testControllerWithEmptyUses ( ) : void
Результат void

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

Test if crud complains about unmapped actions
public testCrudWillComplainAboutUnmappedAction ( ) : void
Результат void

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

Test the default configuration for CrudComponent
public testDefaultConfig ( ) : void
Результат void

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

This proves that not setting 'className' doesn't break
public testDefaultsListenerNotAlreadyLoaded ( ) : void
Результат void

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

Test setting defaults for multiple actions work
public testDefaultsMultipleActions ( ) : void
Результат void

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

Test setting defaults for multiple actions work
public testDefaultsMultipleListeners ( ) : void
Результат void

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

Test setting defaults for one action works
public testDefaultsOnAction ( ) : void
Результат void

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

Test setting defaults for one listener works
public testDefaultsOneListener ( ) : void
Результат void

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

testDisableAction
public testDisableAction ( )

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

testEnable
public testEnable ( )

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

Test deprecated executeAction calls execute correctly

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

Test changing view var for multiple actions works
public testFindMethodMultipleActions ( ) : void
Результат void

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

testIsActionMappedNo

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

testIsActionMappedYes

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

testLoadListener
public testLoadListener ( ) : void
Результат void

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

testMapAction
public testMapAction ( )

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

testMappingNonExistentAction
public testMappingNonExistentAction ( ) : void
Результат void

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

Tests on method registers an event
public testOn ( )

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

tests on method registers an event with extra params

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

Test that removeListener works
public testRemoveListener ( ) : void
Результат void

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

Test removing a listener that doesn't exist should return false
public testRemoveListenerNoExist ( ) : void
Результат void

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

Test that having no mapped model for an action, just use the modelClass from the controller
public testSetModelPropertiesDefault ( ) : void
Результат void

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

Tests that is possible to set the model class to use for the action
public testUseModel ( ) : void
Результат void

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

testView
public testView ( )

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

Test that having a 'search' action in the controller and calling ->execute('index') will still render the 'search' view
public testViewCanBeChangedInControllerAction ( ) : void
Результат void

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

Test changing view var for multiple actions works
public testViewVarMultipleActions ( ) : void
Результат void

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

Test changing view var for one action works
public testViewVarSingleAction ( ) : void
Результат void

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

Test if view with array yields the expected result
public testViewWithArrayIndexAction ( ) : void
Результат void

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

Test if view with array yields the expected result
public testViewWithArrayNewAction ( ) : void
Результат void

Описание свойств

$fixtures публичное свойство

Use the core posts fixture to have something to work on. What fixture is used is almost irrelevant, was chosen as it is simple
public $fixtures