From 18564605ad540435a40aa5fd39f60a0575b7a37a Mon Sep 17 00:00:00 2001 From: Remy Blom <remy.blom@hku.nl> Date: Wed, 21 Jun 2017 15:17:39 +0200 Subject: [PATCH] added test for array to see the new behavior actually works --- .../lib/Auth/Process/AttributeCopyTest.php | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/modules/core/lib/Auth/Process/AttributeCopyTest.php b/tests/modules/core/lib/Auth/Process/AttributeCopyTest.php index 3e3fe58a1..599df57bb 100644 --- a/tests/modules/core/lib/Auth/Process/AttributeCopyTest.php +++ b/tests/modules/core/lib/Auth/Process/AttributeCopyTest.php @@ -38,6 +38,26 @@ class Test_Core_Auth_Process_AttributeCopy extends PHPUnit_Framework_TestCase $this->assertEquals($attributes['testnew'], array('AAP')); } + /** + * Test the most basic functionality. + */ + public function testArray() + { + $config = array( + 'test' => array('new1','new2'), + ); + $request = array( + 'Attributes' => array('test' => array('AAP')), + ); + $result = self::processFilter($config, $request); + $attributes = $result['Attributes']; + $this->assertArrayHasKey('test', $attributes); + $this->assertArrayHasKey('new1', $attributes); + $this->assertArrayHasKey('new2', $attributes); + $this->assertEquals($attributes['new1'], array('AAP')); + $this->assertEquals($attributes['new2'], array('AAP')); + } + /** * Test that existing attributes are left unmodified. */ -- GitLab