From: Tim Otten Date: Fri, 11 Dec 2020 22:08:46 +0000 (-0800) Subject: CRM_Core_Key - Add some basic unit tests X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b49164dd3fab15d323d47b95925c5fb8ddf81dd1;p=civicrm-core.git CRM_Core_Key - Add some basic unit tests --- diff --git a/tests/phpunit/CRM/Core/KeyTest.php b/tests/phpunit/CRM/Core/KeyTest.php new file mode 100644 index 0000000000..66e95042a2 --- /dev/null +++ b/tests/phpunit/CRM/Core/KeyTest.php @@ -0,0 +1,36 @@ +assertTrue(CRM_Core_Key::valid($key)); + $this->assertEquals($key, CRM_Core_Key::validate($key, 'CRM_Bread_Butter')); + } + + public function testMalformed() { + $key = CRM_Core_Key::get('CRM_Bread_Butter') . '