Пример #1
0
 public function testConsentTypes()
 {
     //check the ini file to be the default
     $expected = array('do not use' => 'do not use', 'consent given' => 'consent given');
     $actual = $this->object->getConsentTypes();
     $this->assertEquals($expected, $actual);
     //Check if we can read from an altered ini file
     $project = $this->project;
     $project->consentTypes = 'test|test2|test3';
     $expected = array('test' => 'test', 'test2' => 'test2', 'test3' => 'test3');
     $actual = $this->object->getConsentTypes();
     $this->assertEquals($expected, $actual);
     //Check for class default when not found in ini
     unset($project->consentTypes);
     $expected = array('do not use' => 'do not use', 'consent given' => 'consent given');
     $actual = $this->object->getConsentTypes();
     $this->assertEquals($expected, $actual);
 }