for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SimpleSAML\Module\Monitor\Test;
use SimpleSAML\Configuration;
use SimpleSAML\Module\Monitor\TestCase;
use SimpleSAML\Module\Monitor\TestData;
/**
* Tests for TestCase\Ldap\Configuration
*/
class TestLdapConfigurationTest extends \PHPUnit\Framework\TestCase
{
public function testLdapConfiguration(): void
$authSourceData = [
'hostname' => 'ldaps://ldap.example.com:636',
'debug' => false,
];
$confTest = new TestCase\AuthSource\Ldap\Configuration(
new TestData([
'authSourceData' => Configuration::loadFromArray($authSourceData),
])
);
$testResult = $confTest->getTestResult();
$this->assertEquals('ldaps://ldap.example.com:636', $testResult->getSubject());
'hostname' => 'ldap.example.com',
'port' => 636,
'enable_tls' => true,
'timeout' => 999,
'referrals' => true,
new TestData(['authSourceData' => Configuration::loadFromArray($authSourceData)])
$this->assertEquals('ldap.example.com:636', $testResult->getSubject());
}