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

Class: AlphaController_Test

Source Location: /tests/AlphaController_Test.php

Class AlphaController_Test

Class Overview

Test cases for the AlphaController class.

Located in /tests/AlphaController_Test.php [line 53]

PHPUnit_Framework_TestCase
   |
   --AlphaController_Test
Author(s):
  • John Collins <dev@alphaframework.org>
Information Tags:
Version:  $Id: AlphaController_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()   (non-PHPdoc)
void   tearDown()   (non-PHPdoc)
void   testAbort()   Testing that aborting a unit of work clears the list of new objects
void   testCheckRights()   Testing the checkRights method with various account types
void   testCheckSecurityFields()   Testing the checkSecurityFields method
void   testCommit()   Testing the commit method for new and dirty objects
void   testConstructorJobControllerName()   Testing that the AlphaController constructor uses the controller name as the AlphaController->name (job) of the controller
void   testGetCustomControllerName()   Testing that providing a bad BO name returns null
void   testGetUnitDurationEqual()   test the getUnitDuration method for equality
void   testGetUnitDurationGreater()   Test the getUnitDuration method for greater than
void   testLoadControllerDef()   Testing that a bad controller name passed to loadControllerDef will cause an exception
void   testMarkDirtyAdd()   Testing that objects are being added to the dirtyObjects array correctly
void   testMarkDirtySession()   Testing that objects are being added to the dirtyObject array correctly and that this array is in the session being shared by controllers
void   testMarkNewAdd()   Testing that objects are being added to the newObjects array correctly
void   testMarkNewSession()   Testing that objects are being added to the newObjects array correctly and that this array is in the session being shared by controllers
void   testPostCommitLoad()   Testing that we can load dirty and new objects post commit
void   testRightsAccess()   test cases to see if access rights on controllers are working as expected
void   testSetUnitOfWorkBadControllerName()   Testing the setUnitOfWork method with a bad controller name
void   testSetUnitOfWorkFirst()   Testing the setUnitOfWork method and getFirstJob
void   testSetUnitOfWorkLast()   Testing the setUnitOfWork method and getLastJob
void   testSetUnitOfWorkNext()   Testing the setUnitOfWork method and getNextJob
void   testSetUnitOfWorkPrevious()   Testing the setUnitOfWork method and getPreviousJob
void   testStatusMessages()   Testing that status messages can be shared between controllers via the session
void   testTagsMapToMetaKeywords()   Testing that a BO attached to a controller that contains tags will have those tags mapped to the controller's keywords

[ Top ]
Methods
setUp  [line 92]

  void setUp( )

(non-PHPdoc)


API Tags:
See:  alpha/lib/PEAR/PHPUnit-3.2.9/PHPUnit/Framework/PHPUnit_Framework_TestCase::setUp()
Access:  protected

Information Tags:
Since:  1.0

[ Top ]
tearDown  [line 130]

  void tearDown( )

(non-PHPdoc)


API Tags:
See:  alpha/lib/PEAR/PHPUnit-3.2.9/PHPUnit/Framework/PHPUnit_Framework_TestCase::tearDown()
Access:  protected

Information Tags:
Since:  1.0

[ Top ]
testAbort  [line 429]

  void testAbort( )

Testing that aborting a unit of work clears the list of new objects


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testCheckRights  [line 472]

  void testCheckRights( )

Testing the checkRights method with various account types


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testCheckSecurityFields  [line 489]

  void testCheckSecurityFields( )

Testing the checkSecurityFields method


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testCommit  [line 375]

  void testCommit( )

Testing the commit method for new and dirty objects


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testConstructorJobControllerName  [line 454]

  void testConstructorJobControllerName( )

Testing that the AlphaController constructor uses the controller name as the AlphaController->name (job) of the controller


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testGetCustomControllerName  [line 463]

  void testGetCustomControllerName( )

Testing that providing a bad BO name returns null


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testGetUnitDurationEqual  [line 285]

  void testGetUnitDurationEqual( )

test the getUnitDuration method for equality


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testGetUnitDurationGreater  [line 299]

  void testGetUnitDurationGreater( )

Test the getUnitDuration method for greater than


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testLoadControllerDef  [line 508]

  void testLoadControllerDef( )

Testing that a bad controller name passed to loadControllerDef will cause an exception


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testMarkDirtyAdd  [line 195]

  void testMarkDirtyAdd( )

Testing that objects are being added to the dirtyObjects array correctly


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testMarkDirtySession  [line 209]

  void testMarkDirtySession( )

Testing that objects are being added to the dirtyObject array correctly and that this array is in the session being shared by controllers


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testMarkNewAdd  [line 226]

  void testMarkNewAdd( )

Testing that objects are being added to the newObjects array correctly


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testMarkNewSession  [line 240]

  void testMarkNewSession( )

Testing that objects are being added to the newObjects array correctly and that this array is in the session being shared by controllers


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testPostCommitLoad  [line 395]

  void testPostCommitLoad( )

Testing that we can load dirty and new objects post commit


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testRightsAccess  [line 258]

  void testRightsAccess( )

test cases to see if access rights on controllers are working as expected


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testSetUnitOfWorkBadControllerName  [line 313]

  void testSetUnitOfWorkBadControllerName( )

Testing the setUnitOfWork method with a bad controller name


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testSetUnitOfWorkFirst  [line 339]

  void testSetUnitOfWorkFirst( )

Testing the setUnitOfWork method and getFirstJob


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testSetUnitOfWorkLast  [line 363]

  void testSetUnitOfWorkLast( )

Testing the setUnitOfWork method and getLastJob


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testSetUnitOfWorkNext  [line 327]

  void testSetUnitOfWorkNext( )

Testing the setUnitOfWork method and getNextJob


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testSetUnitOfWorkPrevious  [line 351]

  void testSetUnitOfWorkPrevious( )

Testing the setUnitOfWork method and getPreviousJob


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testStatusMessages  [line 522]

  void testStatusMessages( )

Testing that status messages can be shared between controllers via the session


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]
testTagsMapToMetaKeywords  [line 535]

  void testTagsMapToMetaKeywords( )

Testing that a BO attached to a controller that contains tags will have those tags mapped to the controller's keywords


API Tags:
Access:  public

Information Tags:
Since:  1.0

[ Top ]

Documentation generated on Tue, 13 Dec 2011 20:25:40 +0000 by phpDocumentor 1.4.3