Source for file ApplicationTest.php
Documentation is available at ApplicationTest.php
* "THE BEER-WARE LICENSE" (Revision 42):
* "Sven Strittmatter" <ausserirdisch@sven-space.de> wrote this file.
* As long as you retain this notice you can do whatever you want with
* this stuff. If we meet some day, and you think this stuff is worth it,
* you can buy me a beer in return.
* @copyright Copyright (c) 2009 Sven Strittmatter
// Call Console_ApplicationTest::main() if this source file is executed directly.
if (!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Console_ApplicationTest::main');
require_once(dirname(__FILE__ ) . '/../TestHelper.php');
require_once('Console/Application.php');
require_once('Console/Application/Abstract.php');
public static $didSomething = false;
protected function run() {
self::$didSomething = true;
* @copyright Copyright (c) 2009 Sven Strittmatter
* Runs the test methods of this class.
public static function main() {
require_once('PHPUnit/TextUI/TestRunner.php');
$suite = new PHPUnit_Framework_TestSuite("Console_ApplicationTest");
$result = PHPUnit_TextUI_TestRunner::run($suite);
Console_Application::execute('Test');
$application = Console_Application::execute('Test');
$this->assertTrue($application->isExecuted());
$this->assertTrue($application->isExecuted());
$this->setExpectedException('Console_Exception');
$this->setExpectedException('Console_Exception');
$this->markTestIncomplete();
// Call Console_ApplicationTest::main() if this source file is executed directly.
|