66 lines
1.6 KiB
PHP
66 lines
1.6 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Exemple de test unitaire
|
|
*/
|
|
// Call MyClassTest::main() if this source file is executed directly.
|
|
if (!defined('PHPUnit_MAIN_METHOD')) {
|
|
define('PHPUnit_MAIN_METHOD', 'MyClassTest::main');
|
|
}
|
|
|
|
require_once 'PHPUnit/Framework.php';
|
|
|
|
require_once 'MyClass.php';
|
|
|
|
/**
|
|
* Test class for MyClass.
|
|
* Generated by PHPUnit on 2007-08-11 at 20:01:00.
|
|
*/
|
|
class MyClassTest extends PHPUnit_Framework_TestCase {
|
|
/**
|
|
* Runs the test methods of this class.
|
|
*
|
|
* @access public
|
|
* @static
|
|
*/
|
|
public static function main() {
|
|
require_once 'PHPUnit/TextUI/TestRunner.php';
|
|
|
|
$suite = new PHPUnit_Framework_TestSuite('MyClassTest');
|
|
$result = PHPUnit_TextUI_TestRunner::run($suite);
|
|
}
|
|
|
|
/**
|
|
* Sets up the fixture, for example, opens a network connection.
|
|
* This method is called before a test is executed.
|
|
*
|
|
* @access protected
|
|
*/
|
|
protected function setUp() {
|
|
}
|
|
|
|
/**
|
|
* Tears down the fixture, for example, closes a network connection.
|
|
* This method is called after a test is executed.
|
|
*
|
|
* @access protected
|
|
*/
|
|
protected function tearDown() {
|
|
}
|
|
|
|
/**
|
|
* @todo Implement testMyMethod().
|
|
*/
|
|
public function testMyMethod() {
|
|
// Remove the following lines when you implement this test.
|
|
$this->markTestIncomplete(
|
|
'This test has not been implemented yet.'
|
|
);
|
|
}
|
|
}
|
|
|
|
// Call MyClassTest::main() if this source file is executed directly.
|
|
if (PHPUnit_MAIN_METHOD == 'MyClassTest::main') {
|
|
MyClassTest::main();
|
|
}
|
|
?>
|