Skip to content

Commit

Permalink
Config tests: add cases for '0' and '' (issue #21124)
Browse files Browse the repository at this point in the history
  • Loading branch information
dregad committed Jul 3, 2016
1 parent e0e7924 commit afdd002
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/Mantis/ConfigParserTest.php
Expand Up @@ -227,13 +227,17 @@ private function addScalarCase( $p_string, $p_type ) {
*/
private function initScalarTestCases() {
# Integer
$this->addScalarCase( '0', PHPUnit_Type::TYPE_INT );
$this->addScalarCase( '1', PHPUnit_Type::TYPE_INT );
$this->addScalarCase( " 1\n", PHPUnit_Type::TYPE_INT );

# Float
$this->addScalarCase( '1.1', PHPUnit_Type::TYPE_FLOAT );

# String
$this->addScalarCase( '""', PHPUnit_Type::TYPE_STRING );
$this->addScalarCase( "''", PHPUnit_Type::TYPE_STRING );
$this->addScalarCase( '" "', PHPUnit_Type::TYPE_STRING );
$this->addScalarCase( '"1"', PHPUnit_Type::TYPE_STRING );
$this->addScalarCase( "'1'", PHPUnit_Type::TYPE_STRING );

Expand Down

0 comments on commit afdd002

Please sign in to comment.