public function testGetLatestGitVersionCodeInvalidUrl()
{
$this->assertFalse(
- ApplicationUtils::getLatestGitVersionCode('htttp://null.io', 0)
+ ApplicationUtils::getLatestGitVersionCode('htttp://null.io', 1)
);
}
/**
* A newer version is available
*/
- public function testCheckUpdateNewVersionNew()
+ public function testCheckUpdateNewVersionAvailable()
{
$newVersion = '1.8.3';
FakeApplicationUtils::$VERSION_CODE = $newVersion;
$this->assertFalse($version);
}
+ /**
+ * Test update checks - invalid Git branch
+ * @expectedException Exception
+ * @expectedExceptionMessageRegExp /Invalid branch selected for updates/
+ */
+ public function testCheckUpdateInvalidGitBranch()
+ {
+ ApplicationUtils::checkUpdate('', 'null', 0, true, true, 'unstable');
+ }
+
/**
* Shaarli is up-to-date
*/