diff options
Diffstat (limited to 'scripts/dev/generate-phpt/tests')
15 files changed, 61 insertions, 61 deletions
diff --git a/scripts/dev/generate-phpt/tests/gtBasicTestCaseFunctionTest.php b/scripts/dev/generate-phpt/tests/gtBasicTestCaseFunctionTest.php index dbba0d6470..fa80c0766d 100644 --- a/scripts/dev/generate-phpt/tests/gtBasicTestCaseFunctionTest.php +++ b/scripts/dev/generate-phpt/tests/gtBasicTestCaseFunctionTest.php @@ -6,13 +6,13 @@ class gtBasicTestCaseFunctionTest extends PHPUnit_Framework_TestCase { public function testTestCase() { - + $f = new gtFunction('cos'); $f->setArgumentNames(); $f->setArgumentLists(); $f->setInitialisationStatements(); $optSect = new gtOptionalSections(); - + $btc = gtBasicTestCase::getInstance($optSect); $btc->setFunction($f); $btc->constructTestCase(); diff --git a/scripts/dev/generate-phpt/tests/gtBasicTestCaseMethodTest.php b/scripts/dev/generate-phpt/tests/gtBasicTestCaseMethodTest.php index 81307f139c..18768b6294 100644 --- a/scripts/dev/generate-phpt/tests/gtBasicTestCaseMethodTest.php +++ b/scripts/dev/generate-phpt/tests/gtBasicTestCaseMethodTest.php @@ -6,7 +6,7 @@ class gtBasicTestCaseMethodTest extends PHPUnit_Framework_TestCase { public function testTestCase() { - + $f = new gtMethod('DOMDocument','createAttribute'); $f->setArgumentNames(); $f->setArgumentLists(); @@ -18,11 +18,11 @@ class gtBasicTestCaseMethodTest extends PHPUnit_Framework_TestCase { $btc = gtBasicTestCaseMethod::getInstance($optSect, 'method'); $btc->setMethod($f); $btc->constructTestCase(); - + $fs = $btc->toString(); $this->assertTrue(is_string($fs)); - + } } ?>
\ No newline at end of file diff --git a/scripts/dev/generate-phpt/tests/gtCodeSnippetTest.php b/scripts/dev/generate-phpt/tests/gtCodeSnippetTest.php index bc0c48a5a1..6d4d5861c3 100644 --- a/scripts/dev/generate-phpt/tests/gtCodeSnippetTest.php +++ b/scripts/dev/generate-phpt/tests/gtCodeSnippetTest.php @@ -5,7 +5,7 @@ require_once dirname(__FILE__) . '/../src/gtAutoload.php'; class gtCodeSnippetTest extends PHPUnit_Framework_TestCase { - + public function testAppend() { $array = array('something', 'nothing'); $array = gtCodeSnippet::append('loopClose', $array); diff --git a/scripts/dev/generate-phpt/tests/gtCommandLineOptionsTest.php b/scripts/dev/generate-phpt/tests/gtCommandLineOptionsTest.php index 2fd6818a45..1bf32b4608 100644 --- a/scripts/dev/generate-phpt/tests/gtCommandLineOptionsTest.php +++ b/scripts/dev/generate-phpt/tests/gtCommandLineOptionsTest.php @@ -5,7 +5,7 @@ require_once 'PHPUnit/Framework.php'; class gtCommandLineOptionsTest extends PHPUnit_Framework_TestCase { - + /** * @expectedException RuntimeException */ @@ -26,7 +26,7 @@ require_once 'PHPUnit/Framework.php'; $this->assertTrue($clo->hasOption('f')); $this->assertEquals('some-function', $clo->getOption('f')); } - + /** * @expectedException RuntimeException */ @@ -34,7 +34,7 @@ require_once 'PHPUnit/Framework.php'; $clo = new gtCommandLineOptions(); $clo->parse(array('generate-phpt.php', '-z')); } - + /** * @expectedException RuntimeException */ diff --git a/scripts/dev/generate-phpt/tests/gtErrorTestCaseFunctionTest.php b/scripts/dev/generate-phpt/tests/gtErrorTestCaseFunctionTest.php index 5b72fcc9f5..c6399168be 100644 --- a/scripts/dev/generate-phpt/tests/gtErrorTestCaseFunctionTest.php +++ b/scripts/dev/generate-phpt/tests/gtErrorTestCaseFunctionTest.php @@ -6,23 +6,23 @@ class gtErrorTestCaseFunctionTest extends PHPUnit_Framework_TestCase { public function testTestCase() { - + $f = new gtFunction('cos'); $f->setArgumentNames(); $f->setArgumentLists(); $f->setInitialisationStatements(); - + $optSect = new gtOptionalSections(); - + $btc = gtErrorTestCase::getInstance($optSect); $btc->setFunction($f); $btc->constructTestCase(); - - + + $fs = $btc->toString(); $this->assertTrue(is_string($fs)); - + } - + } ?>
\ No newline at end of file diff --git a/scripts/dev/generate-phpt/tests/gtErrorTestCaseMethodTest.php b/scripts/dev/generate-phpt/tests/gtErrorTestCaseMethodTest.php index 7077881296..894a551597 100644 --- a/scripts/dev/generate-phpt/tests/gtErrorTestCaseMethodTest.php +++ b/scripts/dev/generate-phpt/tests/gtErrorTestCaseMethodTest.php @@ -6,7 +6,7 @@ class gtErrorTestCaseMethodTest extends PHPUnit_Framework_TestCase { public function testTestCase() { - + $f = new gtMethod('DOMDocument', 'createAttribute'); $f->setArgumentNames(); $f->setArgumentLists(); @@ -15,14 +15,14 @@ class gtErrorTestCaseMethodTest extends PHPUnit_Framework_TestCase { $f->setConstructorArgumentNames(); $f->setConstructorInitStatements(); - + $optSect = new gtOptionalSections(); - + $btc = gtErrorTestCase::getInstance($optSect,'method'); $btc->setMethod($f); $btc->constructTestCase(); - - + + $fs = $btc->toString(); $this->assertTrue(is_string($fs)); } diff --git a/scripts/dev/generate-phpt/tests/gtFunctionTest.php b/scripts/dev/generate-phpt/tests/gtFunctionTest.php index 0aa7eac119..5afcd950d4 100644 --- a/scripts/dev/generate-phpt/tests/gtFunctionTest.php +++ b/scripts/dev/generate-phpt/tests/gtFunctionTest.php @@ -43,25 +43,25 @@ class gtFunctionTest extends PHPUnit_Framework_TestCase $this->assertEquals('$ver1', $f->getShortArgumentList()); } - + public function testAllArgumentList() { $f = new gtFunction('version_compare'); $f->setArgumentNames(); $f->setValidArgumentLists(); $a = $f->getValidArgumentLists(); - + $this->assertEquals('$ver1, $ver2', $a[0]); $this->assertEquals('$ver1, $ver2, $oper', $a[1]); } - + public function testInitialisation() { $f = new gtFunction('version_compare'); $f->setArgumentNames(); $f->setInitialisationStatements(); $a = $f->getInitialisationStatements(); - + $this->assertEquals('$ver1 = ', $a[0]); $this->assertEquals('$ver2 = ', $a[1]); $this->assertEquals('$oper = ', $a[2]); diff --git a/scripts/dev/generate-phpt/tests/gtIsSpecifiedFunctionOrMethodTest.php b/scripts/dev/generate-phpt/tests/gtIsSpecifiedFunctionOrMethodTest.php index 064edf3b65..a60f77ef37 100644 --- a/scripts/dev/generate-phpt/tests/gtIsSpecifiedFunctionOrMethodTest.php +++ b/scripts/dev/generate-phpt/tests/gtIsSpecifiedFunctionOrMethodTest.php @@ -20,16 +20,16 @@ class gtIsSpecifiedFunctionOrMethodTest extends PHPUnit_Framework_TestCase { $ch = new gtIsSpecifiedFunctionOrMethod(); $this->assertTrue($ch->check($clo)); } - + public function testNotValid() { $clo = new gtCommandLineOptions(); $clo->parse(array('generate-phpt.php', '-b')); $ch = new gtIsSpecifiedFunctionOrMethod(); $this->assertFalse($ch->check($clo)); - + } - + public function testMessage() { $clo = new gtCommandLineOptions(); diff --git a/scripts/dev/generate-phpt/tests/gtIsSpecifiedTestTypeTest.php b/scripts/dev/generate-phpt/tests/gtIsSpecifiedTestTypeTest.php index c8b0a4e36a..bc7cf9412d 100644 --- a/scripts/dev/generate-phpt/tests/gtIsSpecifiedTestTypeTest.php +++ b/scripts/dev/generate-phpt/tests/gtIsSpecifiedTestTypeTest.php @@ -20,7 +20,7 @@ class gtIsSpecifiedTestTypeTest extends PHPUnit_Framework_TestCase { $ch = new gtIsSpecifiedTestType(); $this->assertFalse($ch->check($clo)); } - + public function testMessage() { $clo = new gtCommandLineOptions(); diff --git a/scripts/dev/generate-phpt/tests/gtIsValidClassTest.php b/scripts/dev/generate-phpt/tests/gtIsValidClassTest.php index 51ca87879d..507ca232db 100644 --- a/scripts/dev/generate-phpt/tests/gtIsValidClassTest.php +++ b/scripts/dev/generate-phpt/tests/gtIsValidClassTest.php @@ -20,7 +20,7 @@ class gtIsValidClassTest extends PHPUnit_Framework_TestCase { $ch = new gtIsValidClass(); $this->assertFalse($ch->check($clo)); } - + public function testNotGiven() { $clo = new gtCommandLineOptions(); @@ -28,7 +28,7 @@ class gtIsValidClassTest extends PHPUnit_Framework_TestCase { $ch = new gtIsValidClass(); $this->assertTrue($ch->check($clo)); } - + public function testMessage() { $clo = new gtCommandLineOptions(); diff --git a/scripts/dev/generate-phpt/tests/gtIsValidFunctionTest.php b/scripts/dev/generate-phpt/tests/gtIsValidFunctionTest.php index d4700b9d66..07a7038dcc 100644 --- a/scripts/dev/generate-phpt/tests/gtIsValidFunctionTest.php +++ b/scripts/dev/generate-phpt/tests/gtIsValidFunctionTest.php @@ -20,7 +20,7 @@ class gtIsValidFunctionTest extends PHPUnit_Framework_TestCase { $ch = new gtIsValidFunction(); $this->assertFalse($ch->check($clo)); } - + public function testNotSupplied() { $clo = new gtCommandLineOptions(); @@ -28,7 +28,7 @@ class gtIsValidFunctionTest extends PHPUnit_Framework_TestCase { $ch = new gtIsValidFunction(); $this->assertTrue($ch->check($clo)); } - + public function testMessage() { $clo = new gtCommandLineOptions(); diff --git a/scripts/dev/generate-phpt/tests/gtIsValidMethodTest.php b/scripts/dev/generate-phpt/tests/gtIsValidMethodTest.php index fe069977ef..0f1b349f4d 100644 --- a/scripts/dev/generate-phpt/tests/gtIsValidMethodTest.php +++ b/scripts/dev/generate-phpt/tests/gtIsValidMethodTest.php @@ -20,7 +20,7 @@ class gtIsValidMethodTest extends PHPUnit_Framework_TestCase { $ch = new gtIsValidMethod(); $this->assertFalse($ch->check($clo)); } - + public function testNotGiven() { $clo = new gtCommandLineOptions(); @@ -28,7 +28,7 @@ class gtIsValidMethodTest extends PHPUnit_Framework_TestCase { $ch = new gtIsValidMethod(); $this->assertTrue($ch->check($clo)); } - + public function testMessage() { $clo = new gtCommandLineOptions(); diff --git a/scripts/dev/generate-phpt/tests/gtOptionalSectionsTest.php b/scripts/dev/generate-phpt/tests/gtOptionalSectionsTest.php index dbf2994567..541dbdf2dd 100644 --- a/scripts/dev/generate-phpt/tests/gtOptionalSectionsTest.php +++ b/scripts/dev/generate-phpt/tests/gtOptionalSectionsTest.php @@ -27,29 +27,29 @@ class gtOptionalSectionsTest extends PHPUnit_Framework_TestCase $opt = new gtOptionalSections(); $opt->setOptions($clo); } - + public function testSkip() { $clo = new gtCommandLineOptions(); $clo->parse(array('generate-phpt.php', '-s', 'skipif', '-x', 'standard')); $opt = new gtOptionalSections(); $opt->setOptions($clo); - + $opt = new gtOptionalSections(); $opt->setOptions($clo); - + $this->assertEquals('standard', $opt->getSkipifExt() ); } - + public function testSkipKey() { $clo = new gtCommandLineOptions(); $clo->parse(array('generate-phpt.php', '-s', 'skipif', '-k', 'win')); $opt = new gtOptionalSections(); $opt->setOptions($clo); - + $opt = new gtOptionalSections(); $opt->setOptions($clo); - + $this->assertEquals('win', $opt->getSkipifKey() ); } diff --git a/scripts/dev/generate-phpt/tests/gtVariationTestCaseFunctionTest.php b/scripts/dev/generate-phpt/tests/gtVariationTestCaseFunctionTest.php index df9f21c309..83178b21e7 100644 --- a/scripts/dev/generate-phpt/tests/gtVariationTestCaseFunctionTest.php +++ b/scripts/dev/generate-phpt/tests/gtVariationTestCaseFunctionTest.php @@ -5,55 +5,55 @@ require_once dirname(__FILE__) . '/../src/gtAutoload.php'; class gtVariationTestCaseFunctionTest extends PHPUnit_Framework_TestCase { public function testTestCase() { - + $f = new gtFunction('cos'); $f->setArgumentNames(); $f->setArgumentLists(); - + $optSect = new gtOptionalSections(); - + $vtc = gtVariationTestCase::getInstance($optSect); $vtc->setUp($f, 1, 'int'); $vtc->constructTestCase(); - + $fs = $vtc->toString(); $this->assertTrue(is_string($fs)); - + } public function testTestCase2() { - + $f = new gtFunction('date_sunrise'); $f->setArgumentNames(); $f->setArgumentLists(); $a = $f->getMandatoryArgumentNames(); - + $optSect = new gtOptionalSections(); - + $vtc = gtVariationTestCase::getInstance($optSect); $vtc->setUp($f, 6, 'int'); $vtc->constructTestCase(); - + $fs = $vtc->toString(); $this->assertTrue(is_string($fs)); - + } - + public function testTestCase3() { - + $f = new gtFunction('date_sunrise'); $f->setArgumentNames(); $f->setArgumentLists(); - + $optSect = new gtOptionalSections(); $vtc = gtVariationTestCase::getInstance($optSect); $vtc->setUp($f, 6, 'array'); $vtc->constructTestCase(); - + $fs = $vtc->toString(); $this->assertTrue(is_string($fs)); - + } } ?>
\ No newline at end of file diff --git a/scripts/dev/generate-phpt/tests/gtVariationTestCaseMethodTest.php b/scripts/dev/generate-phpt/tests/gtVariationTestCaseMethodTest.php index d99b6562d0..a074fcceeb 100644 --- a/scripts/dev/generate-phpt/tests/gtVariationTestCaseMethodTest.php +++ b/scripts/dev/generate-phpt/tests/gtVariationTestCaseMethodTest.php @@ -5,23 +5,23 @@ require_once dirname(__FILE__) . '/../src/gtAutoload.php'; class gtVariationTestCaseMethodTest extends PHPUnit_Framework_TestCase { public function testTestCase() { - + $f = new gtMethod('DOMDocument','createAttribute'); $f->setArgumentNames(); $f->setArgumentLists(); $f->setConstructorArgumentNames(); $f->setConstructorInitStatements(); - + $optSect = new gtOptionalSections(); - + $vtc = gtVariationTestCase::getInstance($optSect, 'method'); $vtc->setUp($f, 1, 'int'); $vtc->constructTestCase(); $fs = $vtc->toString(); - + $this->assertTrue(is_string($fs)); - + } } ?>
\ No newline at end of file |