[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/test/helpers/ -> lifetypetestcase.class.php (sommaire)

(pas de description)

Poids: 159 lignes (4 kb)
Inclus ou requis:0 fois
Référencé: 35 fois
Nécessite: 0 fichiers

Définit 1 class

LifeTypeTestCase:: (7 méthodes):
  assertHTTPResponseCodeEquals()
  assertHTTPResponseContains()
  getTestMethods()
  getSuiteName()
  assertHTTPPostResponseContains()
  getAdminUrl()
  assertUIScript()


Classe: LifeTypeTestCase  - X-Ref

\ingroup Test

Extends the PHPUnit's TestCase class to provide support for using asserts
with HTTP requests. All test suites in LifeType must extend this class instead of
PHPUnit_TestCase.

Please see http://wiki.lifetype.net/index.php/Unit_Testing_in_LifeType for more
information on how unit testing has been implemented in LifeType and how to create your
own test cases.
assertHTTPResponseCodeEquals( $url, $expected, $message = '' )   X-Ref
makes the given HTTP request and checks that the HTTP response code
matches with the expected once

param: url
param: expected
param: message

assertHTTPResponseContains( $url, $expected, $message = '' )   X-Ref
Finds the expected string in the content of the response after fetching the given
url, and raises an error if not there.

param: url
param: expected
param: message

getTestMethods()   X-Ref
Returns a list with all the available test methods in the class (a test method is
a method whose name starst with "test")

return: An array with all the test methods available

getSuiteName()   X-Ref
Returns a string identifying the suite

return: A string

assertHTTPPostResponseContains( $url, $form, $expected, $message = '' )   X-Ref
Finds the expected string in the content of the response after fetching the given
url via a POST request

param: url
param: form An array that will be used as the variables of the form to be POSTed
param: expected
param: message

getAdminUrl()   X-Ref
Returns the admin url


assertUIScript( $script )   X-Ref
Assert method that executes the given UI script and assert an error if the
script was not successfully executed

param: script A UI script



Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics