aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ApplicationUtilsTest.php
diff options
context:
space:
mode:
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()