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:
parent
3abfa00b11
commit
736ea800e3
4 changed files with 36 additions and 3 deletions
|
@ -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'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue