Skip to content
Snippets Groups Projects
Commit fd008b9e authored by Jaime Perez Crespo's avatar Jaime Perez Crespo
Browse files

Fix broken test in AttributeValueMapTest.

parent edbfe515
No related branches found
No related tags found
No related merge requests found
......@@ -159,13 +159,13 @@ class AttributeValueMapTest extends \PHPUnit_Framework_TestCase
*
* @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::__construct
* @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::process
*
* @expectedException \Exception
*/
public function testUnknownFlag()
{
$config = array(
'%test',
'targetattribute' => 'affiliation',
'sourceattribute' => 'memberOf',
'values' => array(
'member' => array(
'theGroup',
......@@ -177,7 +177,10 @@ class AttributeValueMapTest extends \PHPUnit_Framework_TestCase
'memberOf' => array('theGroup'),
),
);
self::processFilter($config, $request);
$result = self::processFilter($config, $request);
$this->assertArrayHasKey('affiliation', $result['Attributes']);
$this->assertArrayNotHasKey('memberOf', $result['Attributes']);
$this->assertContains('member', $result['Attributes']['affiliation']);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment