aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/UtilsTest.php
diff options
context:
space:
mode:
authorArthur <arthur@hoa.ro>2017-01-03 09:57:52 +0100
committerGitHub <noreply@github.com>2017-01-03 09:57:52 +0100
commit64497fb3020e9d2e2c0f9c55c4d10fedbc7a9f79 (patch)
treebefc1823dfc935fd827e6753b48f53d8150c3493 /tests/UtilsTest.php
parente0177549c760b143efdd17b1579e0c0199dce939 (diff)
parentb3051a6aae446e063c3b6fa4a6a600357a9f24af (diff)
downloadShaarli-64497fb3020e9d2e2c0f9c55c4d10fedbc7a9f79.tar.gz
Shaarli-64497fb3020e9d2e2c0f9c55c4d10fedbc7a9f79.tar.zst
Shaarli-64497fb3020e9d2e2c0f9c55c4d10fedbc7a9f79.zip
Merge pull request #725 from ArthurHoaro/hotfix/privatetags-split
Fixes presence of empty tags for private tags and in search results
Diffstat (limited to 'tests/UtilsTest.php')
-rw-r--r--tests/UtilsTest.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/UtilsTest.php b/tests/UtilsTest.php
index 0cf9a921..c885f552 100644
--- a/tests/UtilsTest.php
+++ b/tests/UtilsTest.php
@@ -253,7 +253,7 @@ class UtilsTest extends PHPUnit_Framework_TestCase
253 is_session_id_valid('c0ZqcWF3VFE2NmJBdm1HMVQ0ZHJ3UmZPbTFsNGhkNHI=') 253 is_session_id_valid('c0ZqcWF3VFE2NmJBdm1HMVQ0ZHJ3UmZPbTFsNGhkNHI=')
254 ); 254 );
255 } 255 }
256 256
257 /** 257 /**
258 * Test generateSecretApi. 258 * Test generateSecretApi.
259 */ 259 */
@@ -270,4 +270,16 @@ class UtilsTest extends PHPUnit_Framework_TestCase
270 $this->assertFalse(generate_api_secret('', '')); 270 $this->assertFalse(generate_api_secret('', ''));
271 $this->assertFalse(generate_api_secret(false, false)); 271 $this->assertFalse(generate_api_secret(false, false));
272 } 272 }
273
274 /**
275 * Test normalize_spaces.
276 */
277 public function testNormalizeSpace()
278 {
279 $str = ' foo bar is important ';
280 $this->assertEquals('foo bar is important', normalize_spaces($str));
281 $this->assertEquals('foo', normalize_spaces('foo'));
282 $this->assertEquals('', normalize_spaces(''));
283 $this->assertEquals(null, normalize_spaces(null));
284 }
273} 285}