Alpha Framework alpha--tests
[ class tree: alpha--tests ] [ index: alpha--tests ] [ all elements ]

Class: Enum_Test

Source Location: /tests/Enum_Test.php

Class Enum_Test

Class Overview

Test case for the Enum data type

Located in /tests/Enum_Test.php [line 48]

PHPUnit_Framework_TestCase
   |
   --Enum_Test
Author(s):
  • John Collins <dev@alphaframework.org>
Information Tags:
Version:  $Id: Enum_Test.php 1453 2011-12-04 15:12:54Z johnc $
Copyright:  

Copyright (c) 2011, 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.

Since:  1.0
License:  The BSD License

Methods

[ Top ]
Method Summary
void   setUp()   Called before the test functions will be executed this function is defined in PHPUnit_TestCase and overwritten here
void   tearDown()   Called after the test functions are executed this function is defined in PHPUnit_TestCase and overwritten here
void   testAlphaSortOrder()   Testing the alphabetical sort order on the enum
void   testConstructorFail()   Test the constructor failing when a bad array is provided
void   testDefaultSortOrder()   Testing the default (non-alphabetical) sort order on the enum
void   testGetValue()   Testing the getValue method
void   testLoadEnumOptions()   Testing that enum options are loaded correctly from the database
void   testSetEnumOptions()   Testing the set/get enum option methods
void   testSetValue()   Testing the setValue method with good and bad values

[ Top ]
Methods
setUp  [line 72]

  void setUp( )

Called before the test functions will be executed this function is defined in PHPUnit_TestCase and overwritten here


API Tags:
Access:  protected

Information Tags:
Since:  1.0

[ Top ]
tearDown  [line 89]

  void tearDown( )

Called after the test functions are executed this function is defined in PHPUnit_TestCase and overwritten here


API Tags:
Access:  protected

Information Tags:
Since:  1.0

[ Top ]
testAlphaSortOrder  [line 195]

  void testAlphaSortOrder( )

Testing the alphabetical sort order on the enum


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testConstructorFail  [line 166]

  void testConstructorFail( )

Test the constructor failing when a bad array is provided


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testDefaultSortOrder  [line 182]

  void testDefaultSortOrder( )

Testing the default (non-alphabetical) sort order on the enum


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testGetValue  [line 149]

  void testGetValue( )

Testing the getValue method


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testLoadEnumOptions  [line 103]

  void testLoadEnumOptions( )

Testing that enum options are loaded correctly from the database


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testSetEnumOptions  [line 114]

  void testSetEnumOptions( )

Testing the set/get enum option methods


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testSetValue  [line 125]

  void testSetValue( )

Testing the setValue method with good and bad values


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]

Documentation generated on Tue, 13 Dec 2011 20:26:51 +0000 by phpDocumentor 1.4.3