PHP Class RedUNIT\Base\Database

Tests basic RedBeanPHP database functionality.
Author: Gabor de Mooij and the RedBeanPHP Community
Inheritance: extends RedUNIT\Base
Show file Open project: gabordemooij/redbean

Public Methods

Method Description
getTargetDrivers ( ) What drivers should be loaded for this test pack?
testColonsInSQL ( ) : void Can we use colons in SQL?
testConnectionTester ( ) : void Test for testConnection() method.
testDirectPDO ( ) : void Test setting direct PDO.
testDriver ( ) : void Test the database driver and low level functions.
testEmptyBean ( ) Tests whether we can store an empty bean.
testFetchTypes ( ) Tests the various ways to fetch (select queries) data using adapter methods in the facade.
testSelects ( ) : void Test selecting.
testSetMaxBind ( ) : void Test setter maximum integer bindings.

Method Details

getTargetDrivers() public method

What drivers should be loaded for this test pack?
public getTargetDrivers ( )

testColonsInSQL() public method

Can we use colons in SQL?
public testColonsInSQL ( ) : void
return void

testConnectionTester() public method

Test for testConnection() method.
public testConnectionTester ( ) : void
return void

testDirectPDO() public method

Not much to test actually.
public testDirectPDO ( ) : void
return void

testDriver() public method

Test the database driver and low level functions.
public testDriver ( ) : void
return void

testEmptyBean() public method

An empty bean has no properties, only ID. Normally we would skip the ID field in an INSERT, this test forces the driver to specify a value for the ID field. Different writers have to use different values: Mysql uses NULL to insert a new auto-generated ID, while Postgres has to use DEFAULT.
public testEmptyBean ( )

testFetchTypes() public method

Also tests the new R::getAssocRow() method, as requested in issue #324.
public testFetchTypes ( )

testSelects() public method

Test selecting.
public testSelects ( ) : void
return void

testSetMaxBind() public method

Test setter maximum integer bindings.
public testSetMaxBind ( ) : void
return void