aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/UtilsTest.php
diff options
context:
space:
mode:
authorArthur <arthur@hoa.ro>2016-12-20 11:30:05 +0100
committerGitHub <noreply@github.com>2016-12-20 11:30:05 +0100
commit80677a23e2e10d78bc527e9754286787b453ce61 (patch)
tree18feefc47f389171f3886b191fb14f2ace6d0175 /tests/UtilsTest.php
parente350aa750f9e9e742bb60a1e04ebd9e21f763c78 (diff)
parent18e6796726d73d7dc90ecdd16c181493941f5487 (diff)
downloadShaarli-80677a23e2e10d78bc527e9754286787b453ce61.tar.gz
Shaarli-80677a23e2e10d78bc527e9754286787b453ce61.tar.zst
Shaarli-80677a23e2e10d78bc527e9754286787b453ce61.zip
Merge pull request #666 from ArthurHoaro/slim-api
REST API structure using Slim framework
Diffstat (limited to 'tests/UtilsTest.php')
-rw-r--r--tests/UtilsTest.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/UtilsTest.php b/tests/UtilsTest.php
index 6a7870c4..0cf9a921 100644
--- a/tests/UtilsTest.php
+++ b/tests/UtilsTest.php
@@ -253,4 +253,21 @@ class UtilsTest extends PHPUnit_Framework_TestCase
253 is_session_id_valid('c0ZqcWF3VFE2NmJBdm1HMVQ0ZHJ3UmZPbTFsNGhkNHI=') 253 is_session_id_valid('c0ZqcWF3VFE2NmJBdm1HMVQ0ZHJ3UmZPbTFsNGhkNHI=')
254 ); 254 );
255 } 255 }
256
257 /**
258 * Test generateSecretApi.
259 */
260 public function testGenerateSecretApi()
261 {
262 $this->assertEquals(12, strlen(generate_api_secret('foo', 'bar')));
263 }
264
265 /**
266 * Test generateSecretApi with invalid parameters.
267 */
268 public function testGenerateSecretApiInvalid()
269 {
270 $this->assertFalse(generate_api_secret('', ''));
271 $this->assertFalse(generate_api_secret(false, false));
272 }
256} 273}