From b49164dd3fab15d323d47b95925c5fb8ddf81dd1 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 11 Dec 2020 14:08:46 -0800 Subject: [PATCH] CRM_Core_Key - Add some basic unit tests --- tests/phpunit/CRM/Core/KeyTest.php | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/phpunit/CRM/Core/KeyTest.php 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') . '