[ 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/ -> RepeatedTest.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: RepeatedTest.php,v 1.13 2005/11/10 09:47:14 sebastian Exp $
Poids: 154 lignes (5 kb)
Inclus ou requis:0 fois
Référencé: 1 fois
Nécessite: 0 fichiers

Définit 1 class

PHPUnit_RepeatedTest:: (3 méthodes):
  PHPUnit_RepeatedTest()
  countTestCases()
  run()


Classe: PHPUnit_RepeatedTest  - X-Ref

A Decorator that runs a test repeatedly.

Here is an example:

<code>
<?php
require_once 'PHPUnit.php';
require_once 'PHPUnit/RepeatedTest.php';

class MathTest extends PHPUnit_TestCase {
var $fValue1;
var $fValue2;

function MathTest($name) {
$this->PHPUnit_TestCase($name);
}

function setUp() {
$this->fValue1 = 2;
$this->fValue2 = 3;
}

function testAdd() {
$this->assertTrue($this->fValue1 + $this->fValue2 == 5);
}
}

$suite = new PHPUnit_TestSuite;

$suite->addTest(
new PHPUnit_RepeatedTest(
new MathTest('testAdd'),
10
)
);

$result = PHPUnit::run($suite);
print $result->toString();
?>
</code>

PHPUnit_RepeatedTest(&$test, $timesRepeat = 1)   X-Ref
Constructor.

param: object
param: integer

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

return: integer

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

param: object



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