PHP Class RedUNIT\Base\Bean

One of the core test suites of RedBeanPHP, tests the bean interface and all basic bean functions, including deletion, updating, inserting, importing and more...
Author: Gabor de Mooij and the RedBeanPHP Community
Inheritance: extends RedUNIT\Base
Show file Open project: gabordemooij/redbean

Public Methods

Method Description
testAccessingTainting ( ) : void Test whether the tainted flag gets set correctly.
testBeanTainting ( ) : void Only fire update query if the bean really contains different values. But make sure beans several 'parents' away still get saved.
testBeau ( ) : void Test beautification conflicts.
testCANTDeleteAliasedOwnListWithFalse ( ) : void You cannot delete an aliased own-list by assigning FALSE.
testCANTDeleteAliasedOwnListWithNULL ( ) : void You cannot delete an aliased own-list by assigning NULL.
testCANTDeleteAliasedOwnListWithUnset ( ) : void You cannot delete an aliased own-list by unsetting it.
testCANTDeleteOwnListWithFalse ( ) : void You cannot delete an own-list by assigning FALSE.
testCANTDeleteOwnListWithNULL ( ) : void You cannot delete an own-list by assigning NULL.
testCANTDeleteOwnListWithUnset ( ) You cannot delete an own-list by unsetting it.
testCANTDeleteSharedListWithFalse ( ) : void You cannot delete a shared-list by assigning FALSE.
testCANTDeleteSharedListWithNULL ( ) : void You cannot delete a shared list by assigning NULL.
testCANTDeleteSharedWithUnset ( ) : void You cannot delete a shared-list by unsetting it.
testCANTDeleteViaSharedListWithFalse ( ) : void You cannot delete a shared list by assigning FALSE.
testCANTDeleteViaSharedListWithNULL ( ) : void You cannot delete a shared-list by assigning NULL.
testCANTDeleteViaSharedWithUnset ( ) : void You cannot delete a shared-list by unsetting it.
testCANTDeleteXOwnListWithFalse ( ) : void You cannot delete an x-own-list by assigning FALSE.
testCANTDeleteXOwnListWithNULL ( ) : void You cannot delete an x-own-list by assigning NULL.
testCANTDeleteXOwnListWithUnset ( ) : void You cannot delete an x-own-list by unsetting it.
testDeleteAliasedOwnListWithEmptyArray ( ) : void You CAN delete an aliased own-list by assiging an empty array.
testDeleteByIDs ( ) : void Can we delete a bean in a list by its ID? Only the UNSET() variant should work.
testDeleteOwnListWithEmptyArray ( ) : void You CAN delete an own-list by assiging an empty array.
testDeleteSharedListWithEmptyArray ( ) : void You CAN delete a shared-list by assiging an empty array.
testDeleteViaSharedListWithEmptyArray ( ) : void You CAN delete a shared-list by assiging an empty array.
testDeleteXOwnListWithEmptyArray ( ) : void You CAN delete an x-own-list by assiging an empty array.
testImportFromAndSetProp ( ) : void Tests effects of importFrom and setProperty.
testImportMeta ( ) Tests whether we can send results of a query to meta data when converting to bean.
testMisc ( ) Other tests.
testUnsettingAListAndShadow ( ) : void Tests the effects of unsetting on the shadow of a list.
testUpdateQueries ( ) : void Test whether the number of update queries executed is limited to the ones that are absolutely necessary to sync the database.
testWhetherWeCanAddToLists ( ) * Can we add a bean to a list?
testYouCANDeleteAliasedParentBeanWithFALSE ( ) : void You cannot delete an aliased parent bean by setting it to FALSE.
testYouCANDeleteAliasedParentBeanWithNULL ( ) : void You CAN delete an aliased parent bean by setting it to NULL.
testYouCANDeleteParentBeanWithFALSE ( ) : void You CAN delete a parent bean by setting it to FALSE.
testYouCANDeleteParentBeanWithNULL ( ) : void You cannot delete a parent bean by setting it to NULL.
testYouCANTDeleteAliasedParentBeanWithUnset ( ) : void You cannot delete an aliased parent bean by unsetting it.
testYouCANTDeleteParentBeanWithUnset ( ) : void You cannot delete a parent bean by unsetting it.

Private Methods

Method Description
_createBook ( ) : void Setup

Method Details

testAccessingTainting() public method

Test whether the tainted flag gets set correctly.
public testAccessingTainting ( ) : void
return void

testBeanTainting() public method

Only fire update query if the bean really contains different values. But make sure beans several 'parents' away still get saved.
public testBeanTainting ( ) : void
return void

testBeau() public method

.. Issue #418
public testBeau ( ) : void
return void

testCANTDeleteAliasedOwnListWithFalse() public method

You cannot delete an aliased own-list by assigning FALSE.

testCANTDeleteAliasedOwnListWithNULL() public method

You cannot delete an aliased own-list by assigning NULL.

testCANTDeleteAliasedOwnListWithUnset() public method

You cannot delete an aliased own-list by unsetting it.

testCANTDeleteOwnListWithFalse() public method

You cannot delete an own-list by assigning FALSE.

testCANTDeleteOwnListWithNULL() public method

You cannot delete an own-list by assigning NULL.

testCANTDeleteOwnListWithUnset() public method

You cannot delete an own-list by unsetting it.

testCANTDeleteSharedListWithFalse() public method

You cannot delete a shared-list by assigning FALSE.

testCANTDeleteSharedListWithNULL() public method

You cannot delete a shared list by assigning NULL.

testCANTDeleteSharedWithUnset() public method

You cannot delete a shared-list by unsetting it.

testCANTDeleteViaSharedListWithFalse() public method

You cannot delete a shared list by assigning FALSE.

testCANTDeleteViaSharedListWithNULL() public method

You cannot delete a shared-list by assigning NULL.

testCANTDeleteViaSharedWithUnset() public method

You cannot delete a shared-list by unsetting it.

testCANTDeleteXOwnListWithFalse() public method

You cannot delete an x-own-list by assigning FALSE.

testCANTDeleteXOwnListWithNULL() public method

You cannot delete an x-own-list by assigning NULL.

testCANTDeleteXOwnListWithUnset() public method

You cannot delete an x-own-list by unsetting it.

testDeleteAliasedOwnListWithEmptyArray() public method

You CAN delete an aliased own-list by assiging an empty array.

testDeleteByIDs() public method

Can we delete a bean in a list by its ID? Only the UNSET() variant should work.
public testDeleteByIDs ( ) : void
return void

testDeleteOwnListWithEmptyArray() public method

You CAN delete an own-list by assiging an empty array.

testDeleteSharedListWithEmptyArray() public method

You CAN delete a shared-list by assiging an empty array.

testDeleteViaSharedListWithEmptyArray() public method

You CAN delete a shared-list by assiging an empty array.

testDeleteXOwnListWithEmptyArray() public method

You CAN delete an x-own-list by assiging an empty array.

testImportFromAndSetProp() public method

Tests effects of importFrom and setProperty.
public testImportFromAndSetProp ( ) : void
return void

testImportMeta() public method

Tests whether we can send results of a query to meta data when converting to bean.
public testImportMeta ( )

testMisc() public method

..
public testMisc ( )

testUnsettingAListAndShadow() public method

Tests the effects of unsetting on the shadow of a list.
public testUnsettingAListAndShadow ( ) : void
return void

testUpdateQueries() public method

Test whether the number of update queries executed is limited to the ones that are absolutely necessary to sync the database.
public testUpdateQueries ( ) : void
return void

testWhetherWeCanAddToLists() public method

* Can we add a bean to a list?

testYouCANDeleteAliasedParentBeanWithFALSE() public method

You cannot delete an aliased parent bean by setting it to FALSE.

testYouCANDeleteAliasedParentBeanWithNULL() public method

You CAN delete an aliased parent bean by setting it to NULL.

testYouCANDeleteParentBeanWithFALSE() public method

You CAN delete a parent bean by setting it to FALSE.

testYouCANDeleteParentBeanWithNULL() public method

You cannot delete a parent bean by setting it to NULL.

testYouCANTDeleteAliasedParentBeanWithUnset() public method

You cannot delete an aliased parent bean by unsetting it.

testYouCANTDeleteParentBeanWithUnset() public method

You cannot delete a parent bean by unsetting it.