From 864de72f538f4b0c3a258e15a14fb276e609af70 Mon Sep 17 00:00:00 2001 From: Jaime Perez Crespo <jaime.perez@uninett.no> Date: Tue, 2 Feb 2016 15:59:43 +0100 Subject: [PATCH] Add a test for SimpleSAML_Configuration::getConfigList(). --- tests/lib/SimpleSAML/ConfigurationTest.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/lib/SimpleSAML/ConfigurationTest.php b/tests/lib/SimpleSAML/ConfigurationTest.php index 548f2a966..c85adf290 100644 --- a/tests/lib/SimpleSAML/ConfigurationTest.php +++ b/tests/lib/SimpleSAML/ConfigurationTest.php @@ -451,6 +451,23 @@ class Test_SimpleSAML_Configuration extends PHPUnit_Framework_TestCase $c->getConfigList('opt'); } + + /** + * Test SimpleSAML_Configuration::getConfigList() with an array of wrong options. + * @expectedException Exception + */ + public function testGetConfigListWrongArrayValues() + { + $c = SimpleSAML_Configuration::loadFromArray(array( + 'opts' => array( + 'a', + 'b', + ), + )); + $c->getConfigList('opts'); + } + + /** * Test SimpleSAML_Configuration::getOptions() */ -- GitLab