~critecia/critecia/trunk

« back to all changes in this revision

Viewing changes to src/app/vendors/simpletest/test/command_line_test.php

  • Committer: Christian A. Reiter
  • Date: 2011-11-16 20:08:35 UTC
  • Revision ID: christian.a.reiter@gmail.com-20111116200835-h3xx0ekm47lububw
fixed jQuery file links

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
require_once(dirname(__FILE__) . '/../autorun.php');
3
 
require_once(dirname(__FILE__) . '/../default_reporter.php');
4
 
 
5
 
class TestOfCommandLineParsing extends UnitTestCase {
6
 
    
7
 
    function testDefaultsToEmptyStringToMeanNullToTheSelectiveReporter() {
8
 
        $parser = new SimpleCommandLineParser(array());
9
 
        $this->assertIdentical($parser->getTest(), '');
10
 
        $this->assertIdentical($parser->getTestCase(), '');
11
 
    }
12
 
    
13
 
    function testNotXmlByDefault() {
14
 
        $parser = new SimpleCommandLineParser(array());
15
 
        $this->assertFalse($parser->isXml());
16
 
    }
17
 
    
18
 
    function testCanDetectRequestForXml() {
19
 
        $parser = new SimpleCommandLineParser(array('--xml'));
20
 
        $this->assertTrue($parser->isXml());
21
 
    }
22
 
    
23
 
    function testCanReadAssignmentSyntax() {
24
 
        $parser = new SimpleCommandLineParser(array('--test=myTest'));
25
 
        $this->assertEqual($parser->getTest(), 'myTest');
26
 
    }
27
 
    
28
 
    function testCanReadFollowOnSyntax() {
29
 
        $parser = new SimpleCommandLineParser(array('--test', 'myTest'));
30
 
        $this->assertEqual($parser->getTest(), 'myTest');
31
 
    }
32
 
    
33
 
    function testCanReadShortForms() {
34
 
        $parser = new SimpleCommandLineParser(array('-t', 'myTest', '-c', 'MyClass', '-x'));
35
 
        $this->assertEqual($parser->getTest(), 'myTest');
36
 
        $this->assertEqual($parser->getTestCase(), 'MyClass');
37
 
        $this->assertTrue($parser->isXml());
38
 
    }
39
 
}
40
 
?>
 
 
b'\\ No newline at end of file'