Move some server function to Server::class (from Entry::class)

This commit is contained in:
Deon George
2023-02-19 16:35:07 +11:00
parent 92e5afd614
commit 4f9accbadf
11 changed files with 258 additions and 227 deletions

View File

@@ -4,7 +4,7 @@ namespace Tests\Unit;
use Tests\TestCase;
use App\Ldap\Entry;
use App\Classes\LDAP\Server;
class GetBaseDNTest extends TestCase
{
@@ -13,11 +13,11 @@ class GetBaseDNTest extends TestCase
*
* @return void
* @throws \LdapRecord\Query\ObjectNotFoundException
* @covers \App\Ldap\Entry::baseDNs()
* @covers \App\Classes\LDAP\Server::baseDNs()
*/
public function testBaseDnExists()
{
$o = (new Entry)->baseDNs();
$o = Server::baseDNs();
$this->assertIsObject($o);
$this->assertCount(6,$o->toArray());

View File

@@ -2,10 +2,10 @@
namespace Tests\Unit;
use LdapRecord\Query\ObjectNotFoundException;
use Tests\TestCase;
use App\Classes\LDAP\Server;
use App\Ldap\Entry;
class TranslateOidTest extends TestCase
{
@@ -13,12 +13,12 @@ class TranslateOidTest extends TestCase
* A basic feature test example.
*
* @return void
* @throws \LdapRecord\Query\ObjectNotFoundException
* @covers \App\Classes\LDAP\Server::getOID()
* @throws ObjectNotFoundException
*/
public function testRootDse()
{
$dse = (new Entry)->rootDSE();
$dse = Server::rootDSE();
// Test our rootDSE returns an objectclass attribute
$this->assertIsArray($dse->objectclass);