phpldapadmin/tests/Unit/GetBaseDNTest.php

30 lines
613 B
PHP
Raw Normal View History

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;
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
* @throws \LdapRecord\Models\ModelNotFoundException
* @covers \App\Ldap\Entry::baseDN()
*/
public function testBaseDNExists()
{
$o = (new Entry)->baseDN();
2020-08-23 02:30:18 +00:00
$this->assertIsObject($o);
$this->assertCount(1,$o->toArray());
$this->assertContains('dc=Test',$o->toArray());
2020-08-23 02:30:18 +00:00
}
}