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

Added isDev method to the VersionParser class

This commit is contained in:
Martin Hasoň 2012-03-03 14:07:13 +01:00
parent 3abfa00b11
commit 736ea800e3
4 changed files with 36 additions and 3 deletions

View file

@ -187,4 +187,23 @@ class VersionParserTest extends \PHPUnit_Framework_TestCase
'invalid version' => array('1.0.0-meh'),
);
}
/**
* @dataProvider dataIsDev
*/
public function testIsDev($expected, $version)
{
$this->assertSame($expected, VersionParser::isDev($version));
}
public function dataIsDev()
{
return array(
array(false, '1.0'),
array(false, 'v2.0.*'),
array(false, '3.0dev'),
array(true, 'dev-master'),
array(true, '3.1.2-dev'),
);
}
}