# Class AlphaDAO_Test

Test case for the AlphaDAO class

  PHPUnit_Framework_TestCase
  AlphaDAO_Test

Package: alpha::tests
Copyright: Copyright (c) 2012, John Collins (founder of Alpha Framework). All rights reserved.

    Redistribution and use in source and binary forms, with or
    without modification, are permitted provided that the
    following conditions are met:

    * Redistributions of source code must retain the above
      copyright notice, this list of conditions and the
      following disclaimer.
    * Redistributions in binary form must reproduce the above
      copyright notice, this list of conditions and the
      following disclaimer in the documentation and/or other
      materials provided with the distribution.
    * Neither the name of the Alpha Framework nor the names
      of its contributors may be used to endorse or promote
      products derived from this software without specific
      prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
    OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

License: The BSD License
Author: John Collins <dev@alphaframework.org>
Version: $Id: AlphaDAO_Test.php 1563 2012-08-04 14:36:54Z alphadevx $
Since: 1.0
Located at tests/AlphaDAO_Test.php

Methods summary
`protected` | # `setUp( )` Called before the test functions will be executed this function is defined in PHPUnit_TestCase and overwritten here Called before the test functions will be executed this function is defined in PHPUnit_TestCase and overwritten here #### Since 1.0
`protected` | # `tearDown( )` Called after the test functions are executed this function is defined in PHPUnit_TestCase and overwritten here Called after the test functions are executed this function is defined in PHPUnit_TestCase and overwritten here #### Since 1.0
`private `PersonObject`` | # `createPersonObject( mixed $name )` Creates a person object for Testing Creates a person object for Testing #### Returns ``PersonObject`` #### Since 1.0
`public` | # `testDefaultHouseKeepingValues( )` Test that the constructor sets the correct values of the "house keeping" attributes Test that the constructor sets the correct values of the "house keeping" attributes #### Since 1.0
`public` | # `testBasicLoadSave( )` Testing the basic load/save functionality Testing the basic load/save functionality #### Since 1.0
`public` | # `testCheckRecordExists( )` Testing the checkRecordExists method Testing the checkRecordExists method #### Since 1.0
`public` | # `testLoadByAttribute( )` Testing the loadByAttribute method Testing the loadByAttribute method #### Since 1.0
`public` | # `testLoadAll( )` Testing loadAll method Testing loadAll method #### Since 1.0
`public` | # `testLoadAllByAttribute( )` Testing the loadAllByAttribute method Testing the loadAllByAttribute method #### Since 1.0
`public` | # `testLoadAllByAttributes( )` Testing the loadAllByAttributes method Testing the loadAllByAttributes method #### Since 1.0
`public` | # `testLoadAllByDayUpdated( )` Testing the loadAllByDayUpdated method Testing the loadAllByDayUpdated method #### Since 1.0
`public` | # `testLoadAllFieldValuesByAttribute( )` Testing the loadAllFieldValuesByAttribute method Testing the loadAllFieldValuesByAttribute method #### Since 1.0
`public` | # `testSaveTransientOrPersistent( )` Testing the save method on transient and non-transient objects Testing the save method on transient and non-transient objects #### Since 1.0
`public` | # `testSaveTransientOID( )` Testing to ensure that a transient object, once saved, will have an OID Testing to ensure that a transient object, once saved, will have an OID #### Since 1.0
`public` | # `testSaveObjectLocking( )` Testing optimistic locking mechanism# Testing optimistic locking mechanism# #### Since 1.0
`public` | # `testValidation( )` Testing the validation method Testing the validation method #### Since 1.0
`public` | # `testDelete( )` Testing the delete method Testing the delete method #### Since 1.0
`public` | # `testDeleteAllByAttribute( )` Testing the deleteAllByAttribute method Testing the deleteAllByAttribute method #### Since 1.0
`public` | # `testGetVersion( )` Testing the version numbers of business objects Testing the version numbers of business objects #### Since 1.0
`public` | # `testGetMAX( )` Testing the getMAX method Testing the getMAX method #### Since 1.0
`public` | # `testGetCount( )` Testing the getCount method Testing the getCount method #### Since 1.0
`public` | # `testSetEnumOptions( )` Testing the setEnumOptions method is loading enum options correctly Testing the setEnumOptions method is loading enum options correctly #### Since 1.0
`public` | # `testCheckTableExists( )` Testing that checkTableExists returns true for the person BO Testing that checkTableExists returns true for the person BO #### Since 1.0
`public` | # `testCheckTableNeedsUpdate( )` Testing that checkTableNeedsUpdate returns false for the person BO Testing that checkTableNeedsUpdate returns false for the person BO #### Since 1.0
`public` | # `testGetTableName( )` Testing to ensure that the getTableName method can read the TABLE_NAME constant declared in the child class Testing to ensure that the getTableName method can read the TABLE_NAME constant declared in the child class #### Since 1.0
`public` | # `testGetDataLabel( )` Testing the getDataLabel method Testing the getDataLabel method #### Since 1.0
`public` | # `testGetNoChildMethod( )` Testing get on a String attribute with no child get method available Testing get on a String attribute with no child get method available #### Since 1.0
`public` | # `testGetNoChildMethodsDisabled( )` Testing get on an Enum attribute with a child method available, with $noChildMethods disabled (default) Testing get on an Enum attribute with a child method available, with $noChildMethods disabled (default) #### Since 1.0
`public` | # `testGetNoChildMethodsEnabled( )` Testing get on an Enum attribute with a child method available, with $noChildMethods enabled Testing get on an Enum attribute with a child method available, with $noChildMethods enabled #### Since 1.0
`public` | # `testGetSimpleType( )` Testing get on a simple data type Testing get on a simple data type #### Since 1.0
`public` | # `testSetNoChildMethod( )` Testing set on a String attribute with no child get method available Testing set on a String attribute with no child get method available #### Since 1.0
`public` | # `testSetNoChildMethodsDisabled( )` Testing set on an Enum attribute with a child method available, with $noChildMethods disabled (default) Testing set on an Enum attribute with a child method available, with $noChildMethods disabled (default) #### Since 1.0
`public` | # `testSetNoChildMethodsEnabled( )` Testing set on an Enum attribute with a child method available, with $noChildMethods enabled Testing set on an Enum attribute with a child method available, with $noChildMethods enabled #### Since 1.0
`public` | # `testSetSimpleType( )` Testing set on a simple data type Testing set on a simple data type #### Since 1.0
`public` | # `testGetPropObjectComplexType( )` Testing getPropObject on a complex type Testing getPropObject on a complex type #### Since 1.0
`public` | # `testGetPropObjectSimpleType( )` Testing getPropObject on a simple type Testing getPropObject on a simple type #### Since 1.0
`public` | # `testMarkTransientPersistent( )` Testing that markTransient and markPersistent methods Testing that markTransient and markPersistent methods #### Since 1.0
`public` | # `testGetDataLabels( )` Testing the getDataLabels method Testing the getDataLabels method #### Since 1.0
`public` | # `testGetTransientAttributes( )` Testing the getTransientAttributes method in conjunction with markTransient/markPersistent Testing the getTransientAttributes method in conjunction with markTransient/markPersistent #### Since 1.0
`public` | # `testIsTransient( )` Testing isTransient before and after save Testing isTransient before and after save #### Since 1.0
`public` | # `testGetLastQuery( )` Testing the getLastQuery method after various persistance calls Testing the getLastQuery method after various persistance calls #### Since 1.0
`public` | # `testClear( )` Testing the clear method for unsetting the attributes of an object Testing the clear method for unsetting the attributes of an object #### Since 1.0
`public` | # `testSaveAttribute( )` Testing the saveAttribute method Testing the saveAttribute method #### Since 1.0

Properties summary
`private `PersonObject`` | $person | `` | # A PersonObject for Testing (any business object will do) A PersonObject for Testing (any business object will do) #### Since 1.0