PHP Class RedUNIT\Base\Foreignkeys

Tests whether foreign keys are correctly generated and whether depending beans are correctly removed. Also tests auto resolving types inferred by inspecting foreign keys.
Author: Gabor de Mooij and the RedBeanPHP Community
Inheritance: extends RedUNIT\Base, implements RedBeanPHP\Observer
Show file Open project: gabordemooij/redbean

Public Methods

Method Description
onEvent ( string $event, RedBeanPHP\Adapter $info ) Log queries
testAutoResolvAvoid ( ) : void Test whether aliases are not used if not necessary: when using fetchAs() or R::aliases().
testCreationOfForeignKeys ( ) : void Tests whether foreign keys are created correctly for certain relations.
testDependency ( ) : void Test dependencies.
testDependency2 ( ) : void Test dependencies (variation).
testDependency3 ( ) : void Tests dependencies (variation).
testDependency4 ( ) : void Tests dependencies (variation).
testFKInspect ( ) : void Tests foreign keys but checks using ProxyWriter.
testIssue171 ( ) : void Issue #171 The index name argument is not unique in processEmbeddedBean etc.
testUniqueInspect ( ) : void Test whether unique constraints are properly created using reflection.

Private Methods

Method Description
createBeanInCan ( $isExcl ) : RedBeanPHP\OODBBean Test helper method.
createCanForBean ( ) : RedBeanPHP\OODBBean Test helper method.

Method Details

onEvent() public method

Log queries
public onEvent ( string $event, RedBeanPHP\Adapter $info )
$event string
$info RedBeanPHP\Adapter

testAutoResolvAvoid() public method

Test whether aliases are not used if not necessary: when using fetchAs() or R::aliases().
public testAutoResolvAvoid ( ) : void
return void

testCreationOfForeignKeys() public method

Tests whether foreign keys are created correctly for certain relations.
public testCreationOfForeignKeys ( ) : void
return void

testDependency() public method

Test dependencies.
public testDependency ( ) : void
return void

testDependency2() public method

Test dependencies (variation).
public testDependency2 ( ) : void
return void

testDependency3() public method

Tests dependencies (variation).
public testDependency3 ( ) : void
return void

testDependency4() public method

Tests dependencies (variation).
public testDependency4 ( ) : void
return void

testFKInspect() public method

Tests foreign keys but checks using ProxyWriter.
public testFKInspect ( ) : void
return void

testIssue171() public method

Issue #171 The index name argument is not unique in processEmbeddedBean etc.
public testIssue171 ( ) : void
return void

testUniqueInspect() public method

Test whether unique constraints are properly created using reflection.
public testUniqueInspect ( ) : void
return void