diff options
Diffstat (limited to 'tests/UtilsTest.php')
-rw-r--r-- | tests/UtilsTest.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/UtilsTest.php b/tests/UtilsTest.php index 6cd37a7a..8225d95a 100644 --- a/tests/UtilsTest.php +++ b/tests/UtilsTest.php | |||
@@ -10,7 +10,7 @@ require_once 'application/Languages.php'; | |||
10 | /** | 10 | /** |
11 | * Unitary tests for Shaarli utilities | 11 | * Unitary tests for Shaarli utilities |
12 | */ | 12 | */ |
13 | class UtilsTest extends PHPUnit_Framework_TestCase | 13 | class UtilsTest extends PHPUnit\Framework\TestCase |
14 | { | 14 | { |
15 | // Log file | 15 | // Log file |
16 | protected static $testLogFile = 'tests.log'; | 16 | protected static $testLogFile = 'tests.log'; |
@@ -187,7 +187,8 @@ class UtilsTest extends PHPUnit_Framework_TestCase | |||
187 | /** | 187 | /** |
188 | * Test generate location with valid data. | 188 | * Test generate location with valid data. |
189 | */ | 189 | */ |
190 | public function testGenerateLocation() { | 190 | public function testGenerateLocation() |
191 | { | ||
191 | $ref = 'http://localhost/?test'; | 192 | $ref = 'http://localhost/?test'; |
192 | $this->assertEquals($ref, generateLocation($ref, 'localhost')); | 193 | $this->assertEquals($ref, generateLocation($ref, 'localhost')); |
193 | $ref = 'http://localhost:8080/?test'; | 194 | $ref = 'http://localhost:8080/?test'; |
@@ -199,7 +200,8 @@ class UtilsTest extends PHPUnit_Framework_TestCase | |||
199 | /** | 200 | /** |
200 | * Test generate location - anti loop. | 201 | * Test generate location - anti loop. |
201 | */ | 202 | */ |
202 | public function testGenerateLocationLoop() { | 203 | public function testGenerateLocationLoop() |
204 | { | ||
203 | $ref = 'http://localhost/?test'; | 205 | $ref = 'http://localhost/?test'; |
204 | $this->assertEquals('?', generateLocation($ref, 'localhost', array('test'))); | 206 | $this->assertEquals('?', generateLocation($ref, 'localhost', array('test'))); |
205 | } | 207 | } |
@@ -207,7 +209,8 @@ class UtilsTest extends PHPUnit_Framework_TestCase | |||
207 | /** | 209 | /** |
208 | * Test generate location - from other domain. | 210 | * Test generate location - from other domain. |
209 | */ | 211 | */ |
210 | public function testGenerateLocationOut() { | 212 | public function testGenerateLocationOut() |
213 | { | ||
211 | $ref = 'http://somewebsite.com/?test'; | 214 | $ref = 'http://somewebsite.com/?test'; |
212 | $this->assertEquals('?', generateLocation($ref, 'localhost')); | 215 | $this->assertEquals('?', generateLocation($ref, 'localhost')); |
213 | } | 216 | } |