Adding Support t return versions like: 1.1 or 2.4.9 for Util\Common::getLastVersion(...) and its unit test

This commit is contained in:
Erik Amaru Ortiz
2014-03-06 10:16:14 -04:00
parent 2e80216aa0
commit cf0881302b
8 changed files with 31 additions and 8 deletions

View File

@@ -25,10 +25,17 @@ class XmlExporterTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(5, $lastVer);
}
function testGetLastVersionThr()
{
$lastVer = Util\Common::getLastVersion(__DIR__."/../../fixtures/files_struct/third/sample-*.txt");
$this->assertEquals("3.1.9", $lastVer);
}
/**
* Negative test, no matched files found
*/
function testGetLastVersionThr()
function testGetLastVersionOther()
{
$lastVer = Util\Common::getLastVersion(sys_get_temp_dir()."/sample-*.txt");