org.puremvc.php
[ class tree: org.puremvc.php ] [ index: org.puremvc.php ] [ all elements ]

Class: ControllerTest

Source Location: /org/puremvc/php/core/ControllerTest.php

Class Overview

PHPUnit_Framework_TestCase
   |
   --ControllerTest

Test the PureMVC Controller class.


Author(s):

Methods



Class Details

[line 23]
Test the PureMVC Controller class.



Tags:

see:  org.puremvc.php.core.controller.ControllerTestCommand ControllerTestCommand
see:  org.puremvc.php.core.controller.ControllerTestVO ControllerTestVO


[ Top ]


Class Methods


constructor __construct [line 49]

ControllerTest __construct( )

Constructs the test case.



Tags:

access:  public


[ Top ]

method setUp [line 33]

void setUp( )

Prepares the environment before running a test.



Tags:

access:  protected


[ Top ]

method tearDown [line 41]

void tearDown( )

Cleans up the environment after running a test.



Tags:

access:  protected


[ Top ]

method testGetInstance [line 56]

void testGetInstance( )

Tests the Controller Singleton Factory Method



Tags:

access:  public


[ Top ]

method testHasCommand [line 143]

void testHasCommand( )

Tests hasCommand method.



Tags:

access:  public


[ Top ]

method testRegisterAndExecuteCommand [line 81]

void testRegisterAndExecuteCommand( )

Tests Command registration and execution.

This test gets the Singleton Controller instance and registers the ControllerTestCommand class to handle 'ControllerTest' Notifications.

It then constructs such a Notification and tells the Controller to execute the associated Command. Success is determined by evaluating a property on an object passed to the Command, which will be modified when the Command executes.




Tags:

access:  public


[ Top ]

method testRegisterAndRemoveCommand [line 107]

void testRegisterAndRemoveCommand( )

Tests Command registration and removal.

Tests that once a Command is registered and verified working, it can be removed from the Controller.




Tags:

access:  public


[ Top ]


Documentation generated on Mon, 29 Sep 2008 15:06:17 -0700 by phpDocumentor 1.4.0