2020-08-23 02:30:18 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Tests\Unit;
|
|
|
|
|
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
use Illuminate\Foundation\Testing\WithFaker;
|
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
2020-09-20 13:29:22 +00:00
|
|
|
use Tests\TestCase;
|
2020-08-23 02:30:18 +00:00
|
|
|
|
2020-08-27 12:46:07 +00:00
|
|
|
use App\Classes\LDAP\Server;
|
2020-08-23 02:30:18 +00:00
|
|
|
|
|
|
|
class GetBaseDNTest extends TestCase
|
|
|
|
{
|
2020-08-27 12:46:07 +00:00
|
|
|
/**
|
|
|
|
* Test that we can get the Base DN of an LDAP server
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function testBaseDNExists()
|
|
|
|
{
|
|
|
|
$o = new Server();
|
2020-08-23 02:30:18 +00:00
|
|
|
$x = $o->getBaseDN();
|
|
|
|
|
|
|
|
$this->assertIsObject($x);
|
|
|
|
$this->assertCount(1,$x->toArray());
|
|
|
|
$this->assertContains('dc=Test',$x->toArray());
|
|
|
|
}
|
|
|
|
}
|