application: default to the "stable" branch for update checks
Relates to #372 Relates to #390 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
This commit is contained in:
parent
1b740e3de3
commit
4407b45fd3
4 changed files with 55 additions and 21 deletions
|
@ -75,7 +75,7 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
|
|||
public function testGetLatestGitVersionCodeInvalidUrl()
|
||||
{
|
||||
$this->assertFalse(
|
||||
ApplicationUtils::getLatestGitVersionCode('htttp://null.io', 0)
|
||||
ApplicationUtils::getLatestGitVersionCode('htttp://null.io', 1)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
|
|||
/**
|
||||
* A newer version is available
|
||||
*/
|
||||
public function testCheckUpdateNewVersionNew()
|
||||
public function testCheckUpdateNewVersionAvailable()
|
||||
{
|
||||
$newVersion = '1.8.3';
|
||||
FakeApplicationUtils::$VERSION_CODE = $newVersion;
|
||||
|
@ -134,6 +134,16 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
|
|||
$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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue