OSDN Git Service

Test suite fix, non-lowercase boolean values (e.g. `tRue`) from now on are treated... 0.2.2
authorJan Święcki <jan.swiecki@gmail.com>
Mon, 17 Aug 2015 17:59:59 +0000 (19:59 +0200)
committerJan Święcki <jan.swiecki@gmail.com>
Mon, 17 Aug 2015 17:59:59 +0000 (19:59 +0200)
tests/DocBlockReader/ReaderTest.php

index bc97c1e..cd91a78 100644 (file)
@@ -15,7 +15,7 @@ namespace DocBlockReader;
  * @null-var null
  *
  * @booleanTrue true
- * @booleanTrue2 tRuE
+ * @string3 tRuE
  * @booleanFalse false
  * @booleanNull null
  * 
@@ -25,6 +25,10 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
        public function testParserOne()
        {
                $reader = new Reader($this, 'parserFixture');
+               $this->commonTest($reader);
+       }
+
+       public function commonTest($reader) {
                $parameters = $reader->getParameters();
 
                $this->assertNotEmpty($parameters);
@@ -53,7 +57,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
                $this->assertSame(NULL, $parameters['null-var']);
 
                $this->assertSame(TRUE, $parameters['booleanTrue']);
-               $this->assertSame(TRUE, $parameters['booleanTrue2']);
+               $this->assertSame("tRuE", $parameters['string3']);
                $this->assertSame(FALSE, $parameters['booleanFalse']);
                $this->assertSame(NULL, $parameters['booleanNull']);
        }
@@ -89,7 +93,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
                $this->assertSame(NULL, $parameters['null-var']);
 
                $this->assertSame(TRUE, $parameters['booleanTrue']);
-               $this->assertSame(TRUE, $parameters['booleanTrue2']);
+               $this->assertSame("tRuE", $parameters['string3']);
                $this->assertSame(FALSE, $parameters['booleanFalse']);
                $this->assertSame(NULL, $parameters['booleanNull']);            
        }
@@ -121,7 +125,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
         * @null-var null
         *
         * @booleanTrue true
-        * @booleanTrue2 tRuE
+        * @string3 tRuE
         * @booleanFalse false
         * @booleanNull null
         * 
@@ -303,4 +307,4 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
                        array('fixtureBadVariableDeclarationsTwo')
                );
        }
-}
\ No newline at end of file
+}