From 59c8ed95c59219238c60c42b20159c5fbae1ead3 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sun, 21 Jan 2024 18:15:23 +1100 Subject: [PATCH] Fixes for testing --- app/Classes/LDAP/Attribute.php | 2 +- app/Classes/LDAP/Attribute/ObjectClass.php | 4 ++-- tests/{Unit => Feature}/GetBaseDNTest.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename tests/{Unit => Feature}/GetBaseDNTest.php (95%) diff --git a/app/Classes/LDAP/Attribute.php b/app/Classes/LDAP/Attribute.php index e636a0c..4caaa18 100644 --- a/app/Classes/LDAP/Attribute.php +++ b/app/Classes/LDAP/Attribute.php @@ -105,7 +105,7 @@ class Attribute implements \Countable, \ArrayAccess // No need to load our schema for internal attributes if (! $this->is_internal) - $this->schema = config('server')->schema('attributetypes',$name); + $this->schema = (new Server)->schema('attributetypes',$name); /* # Should this attribute be hidden diff --git a/app/Classes/LDAP/Attribute/ObjectClass.php b/app/Classes/LDAP/Attribute/ObjectClass.php index e2b42c9..a20263c 100644 --- a/app/Classes/LDAP/Attribute/ObjectClass.php +++ b/app/Classes/LDAP/Attribute/ObjectClass.php @@ -5,7 +5,7 @@ namespace App\Classes\LDAP\Attribute; use Illuminate\Contracts\View\View; use Illuminate\Support\Collection; -use App\Classes\LDAP\Attribute; +use App\Classes\LDAP\{Attribute,Server}; /** * Represents an ObjectClass Attribute @@ -23,7 +23,7 @@ final class ObjectClass extends Attribute // Determine which of the values is the structural objectclass foreach ($values as $oc) { - if (config('server')->schema('objectclasses',$oc)->isStructural()) + if ((new Server)->schema('objectclasses',$oc)->isStructural()) $this->structural->push($oc); } } diff --git a/tests/Unit/GetBaseDNTest.php b/tests/Feature/GetBaseDNTest.php similarity index 95% rename from tests/Unit/GetBaseDNTest.php rename to tests/Feature/GetBaseDNTest.php index defd6fa..39b5c06 100644 --- a/tests/Unit/GetBaseDNTest.php +++ b/tests/Feature/GetBaseDNTest.php @@ -1,6 +1,6 @@