[ 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/PHPUnit/ -> TestSuite.php (sommaire)

PHP Version 4 Copyright (c) 2002-2005, Sebastian Bergmann <sb@sebastian-bergmann.de>. All rights reserved.

Author: Sebastian Bergmann <sb@sebastian-bergmann.de>
Copyright: 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de>
License: http://www.opensource.org/licenses/bsd-license.php BSD License
Version: CVS: $Id: TestSuite.php,v 1.17 2005/11/10 09:47:15 sebastian Exp $
Poids: 262 lignes (7 kb)
Inclus ou requis:0 fois
Référencé: 1 fois
Nécessite: 0 fichiers

Définit 1 class

PHPUnit_TestSuite:: (12 méthodes):
  PHPUnit_TestSuite()
  addTest()
  addTestSuite()
  countTestCases()
  getName()
  run()
  runTest()
  setName()
  testAt()
  testCount()
  tests()
  toString()


Classe: PHPUnit_TestSuite  - X-Ref

A TestSuite is a Composite of Tests. It runs a collection of test cases.

Here is an example using the dynamic test definition.

<code>
<?php
$suite = new PHPUnit_TestSuite();
$suite->addTest(new MathTest('testPass'));
?>
</code>

Alternatively, a TestSuite can extract the tests to be run automatically.
To do so you pass the classname of your TestCase class to the TestSuite
constructor.

<code>
<?php
$suite = new TestSuite('classname');
?>
</code>

This constructor creates a suite with all the methods starting with
"test" that take no arguments.

PHPUnit_TestSuite($test = FALSE)   X-Ref
Constructs a TestSuite.

param: mixed

addTest(&$test)   X-Ref
Adds a test to the suite.

param: object

addTestSuite($testClass)   X-Ref
Adds the tests from the given class to the suite.

param: string

countTestCases()   X-Ref
Counts the number of test cases that will be run by this test.

return: integer

getName()   X-Ref
Returns the name of the suite.

return: string

run(&$result)   X-Ref
Runs the tests and collects their result in a TestResult.

param: object

runTest(&$test, &$result)   X-Ref
Runs a test.

param: object
param: object

setName($name)   X-Ref
Sets the name of the suite.

param: string

testAt($index)   X-Ref
Returns the test at the given index.

param: integer
return: object

testCount()   X-Ref
Returns the number of tests in this suite.

return: integer

tests()   X-Ref
Returns the tests as an enumeration.

return: array

toString()   X-Ref
Returns a string representation of the test suite.

return: string



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