PHP Class RedUNIT\Postgres\Writer

Tests for PostgreSQL Query Writer. This test class contains Query Writer specific tests. Use this class to add tests to test Query Writer specific behaviours, quirks and issues.
Author: Gabor de Mooij and the RedBeanPHP Community
Inheritance: extends RedUNIT\Postgres
Mostra file Open project: gabordemooij/redbean

Public Methods

Method Description
testIssue9and10 ( ) : void Various.
testPolygons ( ) : void Test polygons.
testScanningAndCoding ( ) : void Test scanning and coding.
testTypes ( ) : void Test special types.
testTypesDateTimes ( ) : void Datetime.
testTypesDates ( ) : void Test dates.
testTypesDecPoints ( ) : void Test points.
testTypesInvalidMoney ( ) : void Issue #340 Redbean is currently picking up bcrypt hashed passwords (which look like this: $2y$12$85lAS.
testTypesMon ( ) : void Test money types.
testTypesMoney ( ) : void Test money data type.
testTypesMultiDecPoints ( ) : void Test multi points.
testTypesNegativeMoney ( ) : void Test negative money data type.
testTypesPoints ( ) : void Test spatial data types.
testTypesStrings ( ) : void Test types of strings.
testTypesWeirdPoints ( ) : void More points.
testVaria ( ) : void Test various.
testZeroIssue ( ) : void (FALSE should be stored as 0 not as '')

Method Details

testIssue9and10() public method

Tests whether writer correctly handles keyword 'group' and SQL state 23000 issue. These tests remain here to make sure issues 9 and 10 never happen again. However this bug will probably never re-appear due to changed architecture.
public testIssue9and10 ( ) : void
return void

testPolygons() public method

Test polygons.
public testPolygons ( ) : void
return void

testScanningAndCoding() public method

Test scanning and coding.
public testScanningAndCoding ( ) : void
return void

testTypes() public method

Test special types.
public testTypes ( ) : void
return void

testTypesDateTimes() public method

Datetime.
public testTypesDateTimes ( ) : void
return void

testTypesDates() public method

Test dates.
public testTypesDates ( ) : void
return void

testTypesDecPoints() public method

Test points.
public testTypesDecPoints ( ) : void
return void

testTypesInvalidMoney() public method

...SnpDNVGPAC7w0G) as PostgreSQL money types. Then, once R::store is called on the bean, it chokes and throws the following error: PHP Fatal error: Uncaught [22P02] - SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type money: ....
public testTypesInvalidMoney ( ) : void
return void

testTypesMon() public method

Test money types.
public testTypesMon ( ) : void
return void

testTypesMoney() public method

Test money data type.
public testTypesMoney ( ) : void
return void

testTypesMultiDecPoints() public method

Test multi points.
public testTypesMultiDecPoints ( ) : void
return void

testTypesNegativeMoney() public method

Test negative money data type.
public testTypesNegativeMoney ( ) : void
return void

testTypesPoints() public method

Test spatial data types.
public testTypesPoints ( ) : void
return void

testTypesStrings() public method

Test types of strings.
public testTypesStrings ( ) : void
return void

testTypesWeirdPoints() public method

..
public testTypesWeirdPoints ( ) : void
return void

testVaria() public method

Test various somewhat uncommon trash/unassociate scenarios. (i.e. unassociate unrelated beans, trash non-persistant beans etc). Should be handled gracefully - no output checking.
public testVaria ( ) : void
return void

testZeroIssue() public method

(FALSE should be stored as 0 not as '')
public testZeroIssue ( ) : void
return void