Fixes for testing

This commit is contained in:
Deon George 2024-01-21 18:15:23 +11:00
parent 4c8bd1c81f
commit 59c8ed95c5
3 changed files with 4 additions and 4 deletions

View File

@ -105,7 +105,7 @@ class Attribute implements \Countable, \ArrayAccess
// No need to load our schema for internal attributes // No need to load our schema for internal attributes
if (! $this->is_internal) if (! $this->is_internal)
$this->schema = config('server')->schema('attributetypes',$name); $this->schema = (new Server)->schema('attributetypes',$name);
/* /*
# Should this attribute be hidden # Should this attribute be hidden

View File

@ -5,7 +5,7 @@ namespace App\Classes\LDAP\Attribute;
use Illuminate\Contracts\View\View; use Illuminate\Contracts\View\View;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use App\Classes\LDAP\Attribute; use App\Classes\LDAP\{Attribute,Server};
/** /**
* Represents an ObjectClass Attribute * Represents an ObjectClass Attribute
@ -23,7 +23,7 @@ final class ObjectClass extends Attribute
// Determine which of the values is the structural objectclass // Determine which of the values is the structural objectclass
foreach ($values as $oc) { foreach ($values as $oc) {
if (config('server')->schema('objectclasses',$oc)->isStructural()) if ((new Server)->schema('objectclasses',$oc)->isStructural())
$this->structural->push($oc); $this->structural->push($oc);
} }
} }

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Tests\Unit; namespace Tests\Feature;
use Tests\TestCase; use Tests\TestCase;