More SQL command (drop table, drop database)

delete, select & insert upgraded 
More utility function (node to array, arrayToNode)
XMLDB special move command
PHP Unit Test
This commit is contained in:
Chouchen
2010-10-11 14:03:38 +00:00
parent 0b54511565
commit 69b9eb42e2
126 changed files with 42747 additions and 178 deletions

View File

@@ -0,0 +1,40 @@
<?php
require_once(dirname(__FILE__) . '/../autorun.php');
require_once(dirname(__FILE__) . '/../default_reporter.php');
class TestOfCommandLineParsing extends UnitTestCase {
function testDefaultsToEmptyStringToMeanNullToTheSelectiveReporter() {
$parser = new SimpleCommandLineParser(array());
$this->assertIdentical($parser->getTest(), '');
$this->assertIdentical($parser->getTestCase(), '');
}
function testNotXmlByDefault() {
$parser = new SimpleCommandLineParser(array());
$this->assertFalse($parser->isXml());
}
function testCanDetectRequestForXml() {
$parser = new SimpleCommandLineParser(array('--xml'));
$this->assertTrue($parser->isXml());
}
function testCanReadAssignmentSyntax() {
$parser = new SimpleCommandLineParser(array('--test=myTest'));
$this->assertEqual($parser->getTest(), 'myTest');
}
function testCanReadFollowOnSyntax() {
$parser = new SimpleCommandLineParser(array('--test', 'myTest'));
$this->assertEqual($parser->getTest(), 'myTest');
}
function testCanReadShortForms() {
$parser = new SimpleCommandLineParser(array('-t', 'myTest', '-c', 'MyClass', '-x'));
$this->assertEqual($parser->getTest(), 'myTest');
$this->assertEqual($parser->getTestCase(), 'MyClass');
$this->assertTrue($parser->isXml());
}
}
?>