aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ApplicationUtilsTest.php
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2015-11-30 02:03:32 +0100
committerVirtualTam <virtualtam@flibidi.net>2015-11-30 02:03:32 +0100
commit05f21ea82130dca0bf49a16630105d1c5649e6c6 (patch)
tree0604f1af0688325fc8871161a650a7a4ee22fe34 /tests/ApplicationUtilsTest.php
parent1b740e3de39172975d0e755d9a089d2e9a44279d (diff)
parent4407b45fd3b09257ea79edba8d4f50db350f8fa9 (diff)
downloadShaarli-05f21ea82130dca0bf49a16630105d1c5649e6c6.tar.gz
Shaarli-05f21ea82130dca0bf49a16630105d1c5649e6c6.tar.zst
Shaarli-05f21ea82130dca0bf49a16630105d1c5649e6c6.zip
Merge pull request #394 from virtualtam/app-utils/check-update/stable-branch
application: default to the "stable" branch for update checks
Diffstat (limited to 'tests/ApplicationUtilsTest.php')
-rw-r--r--tests/ApplicationUtilsTest.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/ApplicationUtilsTest.php b/tests/ApplicationUtilsTest.php
index 437c21fd..6064357d 100644
--- a/tests/ApplicationUtilsTest.php
+++ b/tests/ApplicationUtilsTest.php
@@ -75,7 +75,7 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
75 public function testGetLatestGitVersionCodeInvalidUrl() 75 public function testGetLatestGitVersionCodeInvalidUrl()
76 { 76 {
77 $this->assertFalse( 77 $this->assertFalse(
78 ApplicationUtils::getLatestGitVersionCode('htttp://null.io', 0) 78 ApplicationUtils::getLatestGitVersionCode('htttp://null.io', 1)
79 ); 79 );
80 } 80 }
81 81
@@ -102,7 +102,7 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
102 /** 102 /**
103 * A newer version is available 103 * A newer version is available
104 */ 104 */
105 public function testCheckUpdateNewVersionNew() 105 public function testCheckUpdateNewVersionAvailable()
106 { 106 {
107 $newVersion = '1.8.3'; 107 $newVersion = '1.8.3';
108 FakeApplicationUtils::$VERSION_CODE = $newVersion; 108 FakeApplicationUtils::$VERSION_CODE = $newVersion;
@@ -135,6 +135,16 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
135 } 135 }
136 136
137 /** 137 /**
138 * Test update checks - invalid Git branch
139 * @expectedException Exception
140 * @expectedExceptionMessageRegExp /Invalid branch selected for updates/
141 */
142 public function testCheckUpdateInvalidGitBranch()
143 {
144 ApplicationUtils::checkUpdate('', 'null', 0, true, true, 'unstable');
145 }
146
147 /**
138 * Shaarli is up-to-date 148 * Shaarli is up-to-date
139 */ 149 */
140 public function testCheckUpdateNewVersionUpToDate() 150 public function testCheckUpdateNewVersionUpToDate()