Class: UnitTest_Controller

Source Location: /tinymvc/myapp/controllers/unittest.php

Class Overview [line 13]

AbstractController
   |
   --UnitTest_Controller

Handles Unit Tests for the website backend.

Author(s):

  • Monte Ohrt

Version:

Copyright:

Variables

Constants

Methods


Inherited Variables

Inherited Constants

Inherited Methods



Class Details

Handles Unit Tests for the website backend.

These unit tests are designed to test all Models, which provide data to the Controllers.

See docs/dev/unittest_backend_howto.txt for instructions on adding your own unit website backend unit tests.

Tags:

[ Top ]


Class Variables


Class Methods

index

void index( )

[line 21]

The main function for unit tests. Drives all unit tests.

Overrides AbstractController::index() (index)

Parameters:

[ Top ]

test_favorites_model

void test_favorites_model( )

[line 173]

Tests the Favorites Model.

Tags:

Parameters:

[ Top ]

test_recipe_model

void test_recipe_model( )

[line 64]

Tests the Recipe Model.

Tags:

Parameters:

[ Top ]

test_special_model

void test_special_model( )

[line 104]

Tests the Special Model

Tags:

Parameters:

[ Top ]

test_unit_test

void test_unit_test( )

[line 49]

Does some initial testing to make sure we are in a state suitable for unit testing.

Tags:

  • private -

Parameters:

[ Top ]

test_user_model

void test_user_model( )

[line 151]

Tests the User Model.

Tags:

Parameters:

[ Top ]

test_view

void test_view( )

[line 250]

Tests the view (i.e. Smarty) by performing some very basic tests.

Smarty has its own set of unit tests, but we are only checking to make sure that there is at least *some* output.

Tags:

  • private -

Parameters:

[ Top ]

_test

void _test( string $testName, bool $condition, string $errorMessage)

[line 284]

Tests $testName with the given $condition, printing $errorMessage

Tags:

  • private -

Parameters:

  • string $testName - The name of the test.
  • bool $condition - The condition for the test.
  • string $errorMessage - The error message to print if the $condition evaluates to false.

[ Top ]


Class Constants


Documentation generated on Tue, 26 May 2009 14:50:38 -0700 by phpDocumentor 1.4.1