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
Branches
Tags
No related merge requests found
...@@ -159,13 +159,13 @@ class AttributeValueMapTest extends \PHPUnit_Framework_TestCase ...@@ -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::__construct
* @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::process * @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::process
*
* @expectedException \Exception
*/ */
public function testUnknownFlag() public function testUnknownFlag()
{ {
$config = array( $config = array(
'%test', '%test',
'targetattribute' => 'affiliation',
'sourceattribute' => 'memberOf',
'values' => array( 'values' => array(
'member' => array( 'member' => array(
'theGroup', 'theGroup',
...@@ -177,7 +177,10 @@ class AttributeValueMapTest extends \PHPUnit_Framework_TestCase ...@@ -177,7 +177,10 @@ class AttributeValueMapTest extends \PHPUnit_Framework_TestCase
'memberOf' => array('theGroup'), '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.
Please register or to comment