PHP Class RedUNIT\Base\Relations

Tests whether RedBeanPHP handles relational data properly. This test suite is quite large because it tests various types of relations as well as simple and complex usage scenarios.
Author: Gabor de Mooij and the RedBeanPHP Community
Inheritance: extends RedUNIT\Base
Show file Open project: gabordemooij/redbean

Public Methods

Method Description
testAllPrefix ( ) : void Test whether ->all() reloads a list.
testAssociationRenaming ( ) : void test emulation via association renaming
testCamelCasingVia ( ) : void Tests whether via() applies camelcase-to-snakecase conversion. Although most of the time you do not need this since via() is meant to remap typical link tables to bean - but alas.
testConfusionWithXOwnList ( ) : void Test whether you can still set items starting with 'xown' or 'own' not followed by an uppercase character.
testCountingAndAliasing ( ) : void Test counting and aliasing.
testCreationOfLinkTable ( ) : void Test creation of link table.
testDontSaveParentIfNotTainted ( ) : void Test whether untainted parent bean dont get saved.
testDontTryToStoreOtherThingsInSharedList ( ) : void Test don't try to store other things in shared list.
testDuplicateFK ( ) Test whether we can't add more than one FK.
testFastTrackRelations ( ) : void Fast track link block code should not affect self-referential N-M relations.
testIssue348 ( ) : void Issue #348 via() should reload shared list
testListAddDelete ( ) : void Test list add and delete.
testListBeautifications ( ) : void Test list beautifications.
testModeCheckerOfLists ( ) : void Test whether we can determine the mode of a list.
testNMRelationsIntermediate ( ) : void test N-M relations through intermediate beans
testParentBean ( ) : void Test parent bean relations.
testRelatedCountVia ( ) : void Test related count using via().
testRelationsAndConditions ( ) : void Test Relations and conditions.
testScenarios ( ) : void Test basic and complex common usage scenarios for relations and associations.
testSharedLinkCond ( ) : void Test filtering relations on links (using columns in the link table).
testSharedListIntermediate ( ) : void test emulation of sharedList through intermediate beans
testVia ( ) : void Test via.
testWhetherIssetWorksWithXList ( ) : void Test whether magic array interface functions like isset() and unset work correctly with the x-own-list and the List-suffix.

Method Details

testAllPrefix() public method

Test whether ->all() reloads a list.
public testAllPrefix ( ) : void
return void

testAssociationRenaming() public method

test emulation via association renaming
public testAssociationRenaming ( ) : void
return void

testCamelCasingVia() public method

Tests whether via() applies camelcase-to-snakecase conversion. Although most of the time you do not need this since via() is meant to remap typical link tables to bean - but alas.
public testCamelCasingVia ( ) : void
return void

testConfusionWithXOwnList() public method

Test whether you can still set items starting with 'xown' or 'own' not followed by an uppercase character.
public testConfusionWithXOwnList ( ) : void
return void

testCountingAndAliasing() public method

Test counting and aliasing.
public testCountingAndAliasing ( ) : void
return void

testCreationOfLinkTable() public method

Test creation of link table.
public testCreationOfLinkTable ( ) : void
return void

testDontSaveParentIfNotTainted() public method

Test whether untainted parent bean dont get saved.

testDontTryToStoreOtherThingsInSharedList() public method

Test don't try to store other things in shared list.

testDuplicateFK() public method

Test whether we can't add more than one FK.
public testDuplicateFK ( )

testFastTrackRelations() public method

Fast track link block code should not affect self-referential N-M relations.
public testFastTrackRelations ( ) : void
return void

testIssue348() public method

Issue #348 via() should reload shared list
public testIssue348 ( ) : void
return void

testListAddDelete() public method

Test list add and delete.
public testListAddDelete ( ) : void
return void

testListBeautifications() public method

Test list beautifications.
public testListBeautifications ( ) : void
return void

testModeCheckerOfLists() public method

Test whether we can determine the mode of a list.
public testModeCheckerOfLists ( ) : void
return void

testNMRelationsIntermediate() public method

test N-M relations through intermediate beans
public testNMRelationsIntermediate ( ) : void
return void

testParentBean() public method

Test parent bean relations.
public testParentBean ( ) : void
return void

testRelatedCountVia() public method

Test related count using via().
public testRelatedCountVia ( ) : void
return void

testRelationsAndConditions() public method

Test Relations and conditions.
public testRelationsAndConditions ( ) : void
return void

testScenarios() public method

Test basic and complex common usage scenarios for relations and associations.
public testScenarios ( ) : void
return void

testSharedLinkCond() public method

Test filtering relations on links (using columns in the link table).
public testSharedLinkCond ( ) : void
return void

testSharedListIntermediate() public method

test emulation of sharedList through intermediate beans
public testSharedListIntermediate ( ) : void
return void

testVia() public method

Test via.
public testVia ( ) : void
return void

testWhetherIssetWorksWithXList() public method

Array functions do not reveal x-own-lists and list-alias because you dont want duplicate entries in foreach-loops. Also offers a slight performance improvement for array access.