PHP Класс RedUNIT\Base\Typechecking

Tests whether RedBeanPHP handles type casting correctly.
Автор: Gabor de Mooij and the RedBeanPHP Community
Наследование: extends RedUNIT\Base
Показать файл Открыть проект

Открытые методы

Метод Описание
testBeanTypeChecking ( ) : void Test bean type checking.
testTypes ( ) : void Test types.

Описание методов

testBeanTypeChecking() публичный Метод

Test bean type checking.
public testBeanTypeChecking ( ) : void
Результат void

testTypes() публичный Метод

Test how RedBeanPHP OODB and OODBBean handle type and type casts. Rules: 1. before storing a bean all types are preserved except booleans (they are converted to STRINGS '0' or '1') 2. after store-reload all bean property values are STRINGS or NULL (or ARRAYS but that's only from a user perspective because these are lazy loaded) 3. the ID returned by store() is an INTEGER (if possible; on 32 bit systems overflowing values will be cast to STRINGS!) After loading: ALL VALUES EXCEPT NULL -> STRING NULL -> NULL
public testTypes ( ) : void
Результат void