1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Add more tests and validate that there is only one comma

This commit is contained in:
Jordi Boggiano 2014-01-15 17:13:42 +01:00
parent ca168d478b
commit 4c713978e9
2 changed files with 8 additions and 1 deletions

View file

@ -313,6 +313,10 @@ class VersionParserTest extends \PHPUnit_Framework_TestCase
array('>2.0, <=3.0'),
array('>2.0 ,<=3.0'),
array('>2.0 , <=3.0'),
array('>2.0 , <=3.0'),
array('> 2.0 <= 3.0'),
array('> 2.0 , <= 3.0'),
array(' > 2.0 , <= 3.0 '),
);
}
@ -365,6 +369,9 @@ class VersionParserTest extends \PHPUnit_Framework_TestCase
return array(
'empty ' => array(''),
'invalid version' => array('1.0.0-meh'),
'operator abuse' => array('>2.0,,<=3.0'),
'operator abuse/2' => array('>2.0 ,, <=3.0'),
'operator abuse/3' => array('>2.0 || <=3.0'),
);
}