phpldapadmin/tests/Unit/GetBaseDNTest.php

27 lines
489 B
PHP
Raw Normal View History

2020-08-23 02:30:18 +00:00
<?php
namespace Tests\Unit;
use Tests\TestCase;
2020-08-23 02:30:18 +00:00
use App\Ldap\Entry;
2020-08-23 02:30:18 +00:00
class GetBaseDNTest extends TestCase
{
/**
* Test that we can get the Base DN of an LDAP server
*
* @return void
2023-01-27 11:16:25 +00:00
* @throws \LdapRecord\Query\ObjectNotFoundException
* @covers \App\Ldap\Entry::baseDNs()
*/
2023-01-27 11:16:25 +00:00
public function testBaseDnExists()
{
$o = (new Entry)->baseDNs();
2020-08-23 02:30:18 +00:00
$this->assertIsObject($o);
2023-01-27 11:16:25 +00:00
$this->assertCount(6,$o->toArray());
$this->assertEquals('dc=Test',$o->first()->getDn());
2020-08-23 02:30:18 +00:00
}
}