setStrict() публичный метод

Set the strict mode active/disable
public setStrict ( boolean $value ) : array
$value boolean Strict parameter
Результат array The settings data.
Пример #1
0
 /**
  * Tests the setStrict method of the OneLogin_Saml2_Auth
  *
  * @covers OneLogin_Saml2_Auth::setStrict
  */
 public function testSetStrict()
 {
     $settingsDir = TEST_ROOT . '/settings/';
     include $settingsDir . 'settings1.php';
     $settingsInfo['strict'] = false;
     $auth = new OneLogin_Saml2_Auth($settingsInfo);
     $settings = $auth->getSettings();
     $this->assertFalse($settings->isStrict());
     $auth->setStrict(true);
     $settings = $auth->getSettings();
     $this->assertTrue($settings->isStrict());
     $auth->setStrict(false);
     $settings = $auth->getSettings();
     $this->assertFalse($settings->isStrict());
     try {
         $auth->setStrict('a');
         $this->assertTrue(false);
     } catch (Exception $e) {
         $this->assertContains('Assertion "is_bool($value)" failed', $e->getMessage());
     }
 }