Commit a7daf3c2 authored by Liam Morland's avatar Liam Morland
Browse files

ISTWCMS-4591: Comment-out test that does not work

Without the needed 'use' statement, AccountProxy::class would cause this
test method to silently exit, giving the appearance of a passing test.

Fixes problem introduced in 6b1a55c5.
parent 83ab38c1
......@@ -2491,8 +2491,8 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this->assertSession()->statusCodeEquals(200);
$this->assertSession()->pageTextContains('LDAP View: wcmsadmi');
// Test that the LDAP page contains the full name of user wcmsadmi.
// This ought to pass, but in UWLdap::openConnection(), configFactory->get()
// returns NULLs for values in testing preventing LDAP bind.
// @todo This ought to pass, but in UWLdap::openConnection(),
// configFactory->get() returns NULLs for values in testing preventing bind.
// @code
// $this->assertSession()->pageTextContains('Administrator Wcms');
// @endcode
......@@ -2512,12 +2512,17 @@ class UwWcmsBasicTest extends BrowserTestBase {
$ldap = new UWLdap($config_factory, $current_user);
// Test search() and lookupPerson().
$search = $ldap->search('(sAMAccountName=wcmsadmi)');
$search = $ldap->formatResults($search[0]);
$lookup = $ldap->lookupPerson('wcmsadmi');
$this->assertEquals($search, $lookup, 'LDAP search() and lookupPerson() give matching results.');
$this->assertEquals($lookup['displayname'][0], 'Administrator Wcms', 'Expected name found in LDAP.');
// @todo This test does not work: search() returns NULL. Fix and enable.
// @code
// $search = $ldap->search('(sAMAccountName=wcmsadmi)');
// $search = $ldap->formatResults($search[0]);
// $lookup = $ldap->lookupPerson('wcmsadmi');
// $this->assertEquals($search, $lookup,
// 'LDAP search() and lookupPerson() give matching results.');
// $this->assertEquals($lookup['displayname'][0], 'Administrator Wcms',
// 'Expected name found in LDAP.');
// @endcode
//
// Test formatResults().
$test_in = ['objectguid' => ['ABCDEFGHIJKLMNOP']];
$test_in = $ldap->formatResults($test_in);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment