Framework update and updates from other projects,remove leenooks/laravel

Framework updates, and hack to get CI testing working
This commit is contained in:
Deon George 2021-12-03 13:36:25 +11:00
parent 88eb35a567
commit 2ccc1d3b83
33 changed files with 3424 additions and 2184 deletions

View File

@ -3,7 +3,7 @@ root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
insert_final_newline = false
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
@ -13,3 +13,6 @@ trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2
[docker-compose.yml]
indent_size = 4

View File

@ -23,7 +23,7 @@ REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=smtp
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null

View File

@ -1,5 +1,5 @@
test:
image: ${CI_REGISTRY}/leenooks/php:7.4-fpm-mp-test
image: ${CI_REGISTRY}/leenooks/php:8.0-fpm-latest-test
stage: test

View File

@ -1,4 +1,4 @@
FROM registry.leenooks.net/leenooks/php:7.4-fpm-mp
FROM registry.leenooks.net/leenooks/php:8.0-fpm-latest
COPY . /var/www/html/

View File

@ -22,34 +22,20 @@ class Handler extends ExceptionHandler
* @var array
*/
protected $dontFlash = [
'current_password',
'password',
'password_confirmation',
];
/**
* Report or log an exception.
* Register the exception handling callbacks for the application.
*
* @param \Throwable $exception
* @return void
*
* @throws \Exception
*/
public function report(Throwable $exception)
public function register()
{
parent::report($exception);
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Throwable $exception
* @return \Symfony\Component\HttpFoundation\Response
*
* @throws \Throwable
*/
public function render($request, Throwable $exception)
{
return parent::render($request, $exception);
$this->reportable(function (Throwable $e) {
//
});
}
}

View File

@ -1,33 +0,0 @@
<?php
namespace App\Http\Controllers\Auth;
use Illuminate\Support\Facades\Auth;
use App\Http\Controllers\Controller;
use Socialite;
class SocialLoginController extends Controller
{
public function redirectToProvider($provider)
{
return Socialite::with($provider)->redirect();
}
public function handleProviderCallback($provider)
{
$openiduser = Socialite::with($provider)->user();
$user = Socialite::with($provider)->findOrCreateUser($openiduser);
Auth::login($user,FALSE);
/*
if (! $user->profile_update)
{
return redirect()->to(url('settings'));
}
*/
return redirect()->intended();
}
}

View File

@ -59,7 +59,7 @@ class HomeController extends Controller
$attrs = collect();
}
return view('widgets.dn')
return view('frames.dn')
->with('dn',__('Server Info'))
->with('leaf',$root)
->with('attributes',$this->sortAttrs($attrs));
@ -69,7 +69,7 @@ class HomeController extends Controller
{
$dn = Crypt::decryptString($request->post('key'));
return view('widgets.dn')
return view('frames.dn')
->with('dn',$dn)
->with('leaf',$x=(new Server)->fetch($dn))
->with('attributes',$x ? $this->sortAttrs(collect($x->getAttributes())) : []);

View File

@ -5,6 +5,8 @@ namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
use Laravel\Passport\Http\Middleware\CreateFreshApiToken;
use App\Http\Middleware\GuestUser;
class Kernel extends HttpKernel
{
/**
@ -39,6 +41,7 @@ class Kernel extends HttpKernel
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\Laravel\Passport\Http\Middleware\CreateFreshApiToken::class,
GuestUser::class,
],
'api' => [

View File

@ -0,0 +1,27 @@
<?php
namespace App\Http\Middleware;
use App\Ldap\User;
use Closure;
/**
* Class GuestUser
* @package Leenooks\Laravel\Http\Middleware
*/
class GuestUser
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request,Closure $next)
{
view()->share('user', auth()->user() ?: new User);
return $next($request);
}
}

View File

@ -2,27 +2,32 @@
namespace App\Providers;
use Illuminate\Cache\RateLimiting\Limit;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\Facades\Route;
class RouteServiceProvider extends ServiceProvider
{
/**
* This namespace is applied to your controller routes.
*
* In addition, it is set as the URL generator's root namespace.
*
* @var string
*/
protected $namespace = 'App\Http\Controllers';
/**
* The path to the "home" route for your application.
*
* This is used by Laravel authentication to redirect users after login.
*
* @var string
*/
public const HOME = '/home';
/**
* The controller namespace for the application.
*
* When present, controller route declarations will automatically be prefixed with this namespace.
*
* @var string|null
*/
// protected $namespace = 'App\\Http\\Controllers';
/**
* Define your route model bindings, pattern filters, etc.
*
@ -30,51 +35,29 @@ class RouteServiceProvider extends ServiceProvider
*/
public function boot()
{
//
$this->configureRateLimiting();
parent::boot();
$this->routes(function () {
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
});
}
/**
* Define the routes for the application.
* Configure the rate limiters for the application.
*
* @return void
*/
public function map()
protected function configureRateLimiting()
{
$this->mapApiRoutes();
$this->mapWebRoutes();
//
}
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*
* @return void
*/
protected function mapWebRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
}
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
*
* @return void
*/
protected function mapApiRoutes()
{
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
});
}
}

2
artisan Normal file → Executable file
View File

@ -11,7 +11,7 @@ define('LARAVEL_START', microtime(true));
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
| loading of any of our classes manually. It's great to relax.
|
*/

View File

@ -2,49 +2,34 @@
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"keywords": [ "framework", "laravel" ],
"license": "MIT",
"require": {
"php": "^7.2.5",
"php": "^7.4|^8.0",
"directorytree/ldaprecord-laravel": "^1.7",
"fideloper/proxy": "^4.2",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^6.3",
"laravel/framework": "^7.22.2",
"laravel/passport": "^9.3",
"laravel/ui": "^2.1",
"leenooks/laravel": "7.0",
"mcamara/laravel-localization": "^1.6"
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.54",
"laravel/passport": "^10.1",
"laravel/ui": "^3.2",
"mcamara/laravel-localization": "^1.6",
"orchestra/asset": "^6.1"
},
"require-dev": {
"facade/ignition": "^2.0",
"fzaninotto/faker": "^1.9.1",
"laravel/tinker": "^2.0",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
"barryvdh/laravel-debugbar": "^3.5",
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
@ -57,8 +42,6 @@
"url": "https://dev.leenooks.net/leenooks/laravel"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
@ -70,5 +53,17 @@
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}

5078
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -211,6 +211,7 @@ return [
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class,
'Date' => Illuminate\Support\Facades\Date::class,
'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class,
@ -224,8 +225,9 @@ return [
'Notification' => Illuminate\Support\Facades\Notification::class,
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'RateLimiter' => Illuminate\Support\Facades\RateLimiter::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
'Redis' => Illuminate\Support\Facades\Redis::class,
// 'Redis' => Illuminate\Support\Facades\Redis::class,
'Request' => Illuminate\Support\Facades\Request::class,
'Response' => Illuminate\Support\Facades\Response::class,
'Route' => Illuminate\Support\Facades\Route::class,

View File

@ -15,7 +15,7 @@ return [
|
*/
'paths' => ['api/*'],
'paths' => ['api/*', 'sanctum/csrf-cookie'],
'allowed_methods' => ['*'],

View File

@ -44,13 +44,13 @@ return [
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
'level' => env('LOG_LEVEL', 'debug'),
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
'level' => env('LOG_LEVEL', 'debug'),
'days' => 14,
],
@ -59,12 +59,12 @@ return [
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => 'critical',
'level' => env('LOG_LEVEL', 'critical'),
],
'papertrail' => [
'driver' => 'monolog',
'level' => 'debug',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => SyslogUdpHandler::class,
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
@ -74,6 +74,7 @@ return [
'stderr' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
@ -83,12 +84,12 @@ return [
'syslog' => [
'driver' => 'syslog',
'level' => 'debug',
'level' => env('LOG_LEVEL', 'debug'),
],
'errorlog' => [
'driver' => 'errorlog',
'level' => 'debug',
'level' => env('LOG_LEVEL', 'debug'),
],
'null' => [

0
htdocs/images/default/key.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 519 B

After

Width:  |  Height:  |  Size: 519 B

View File

@ -2,28 +2,17 @@
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
"production": "mix --production"
},
"devDependencies": {
"cross-env": "^5.2.1",
"laravel-mix": "^5.0.1",
"resolve-url-loader": "^2.3.1",
"sass": "^1.15.2",
"sass-loader": "^8.0.0",
"vue-template-compiler": "^2.6.11"
},
"dependencies": {
"axios": "^0.19",
"bootstrap": "^4.2.1",
"jquery": "^3.5.1",
"laravel-echo": "^1.6.1",
"lodash": "^4.17.13",
"popper.js": "^1.16.0",
"pusher-js": "^5.0.3"
"axios": "^0.21",
"laravel-mix": "^6.0.6",
"lodash": "^4.17.19",
"postcss": "^8.1.14"
}
}

View File

@ -1,13 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
>
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
@ -18,14 +23,11 @@
</whitelist>
</filter>
<php>
<server name="APP_ENV" value="testing"/>
<server name="BCRYPT_ROUNDS" value="4"/>
<server name="CACHE_DRIVER" value="array"/>
<!-- <server name="DB_CONNECTION" value="sqlite"/> -->
<!-- <server name="DB_DATABASE" value=":memory:"/> -->
<server name="MAIL_MAILER" value="array"/>
<server name="QUEUE_CONNECTION" value="sync"/>
<server name="SESSION_DRIVER" value="array"/>
<server name="TELESCOPE_ENABLED" value="false"/>
<env name="APP_ENV" value="testing"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="MAIL_DRIVER" value="array"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
</php>
</phpunit>

24
public/css/fixes.css vendored
View File

@ -1,20 +1,26 @@
body {
font-size: 0.85em;
}
/* Fixes for data tables */
/* Fix pagination buttons */
.dataTables_wrapper .dataTables_paginate .paginate_button {
padding: 0em 0em;
margin-left: 0px;
border: 0px solid;
padding: 0 0;
margin-left: 0;
border: 0 solid;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
border: 0px solid;
border: 0 solid;
background: #fff;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:active {
box-shadow: 0 0 0px #fff;
box-shadow: 0 0 0 #fff;
background-color: #fff;
}
/* Remove multiple sorting images on tables */
table.dataTable thead .sorting_asc {
background-image: none !important;
}
@ -56,10 +62,6 @@ table.dataTable thead .sorting {
font-size: 1.0rem;
}
body {
font-size: 0.85em;
}
/** SIDEBAR FIXES **/
/**
@ -79,12 +81,12 @@ body {
/* Fancy Tree Fixes */
/** Remove the border around the tree **/
ul.fancytree-container {
border: 0px;
border: 0;
}
/** Tree Placement **/
#tree > ul {
padding-left: 0px;
padding-left: 0;
}
/** Fix tree rendering **/
.fancytree-node {

View File

@ -1,23 +1,33 @@
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.com>
*/
use Illuminate\Contracts\Http\Kernel;
use Illuminate\Http\Request;
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Check If The Application Is Under Maintenance
|--------------------------------------------------------------------------
|
| If the application is in maintenance / demo mode via the "down" command
| we will load this file so that any pre-rendered content can be shown
| instead of starting the framework, which could cause an exception.
|
*/
if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
require __DIR__.'/../storage/framework/maintenance.php';
}
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels great to relax.
| this application. We just need to utilize it! We'll simply require it
| into the script here so we don't need to manually load our classes.
|
*/
@ -25,36 +35,21 @@ require __DIR__.'/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Turn On The Lights
| Run The Application
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
| Once we have the application, we can handle the incoming request using
| the application's HTTP kernel. Then, we will send the response back
| to this client's browser, allowing them to enjoy our application.
|
*/
$app = require_once __DIR__.'/../bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/
$kernel = $app->make(Kernel::class);
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$response = tap($kernel->handle(
$request = Request::capture()
))->send();
$kernel->terminate($request, $response);

View File

@ -1,4 +1,3 @@
window.$ = window.jQuery = require('jquery');
window._ = require('lodash');
/**
@ -17,19 +16,13 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
* allows your team to easily build robust real-time web applications.
*/
import Echo from 'laravel-echo';
// import Echo from 'laravel-echo';
/*
window.Pusher = require('pusher-js');
// window.Pusher = require('pusher-js');
window.Echo = new Echo({
broadcaster: 'pusher',
key: process.env.MIX_PUSHER_APP_KEY,
wsHost: window.location.hostname,
wsPort: 6001,
disableStats: true,
useTLS: false,
});
*/
//require('bootstrap');
// window.Echo = new Echo({
// broadcaster: 'pusher',
// key: process.env.MIX_PUSHER_APP_KEY,
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
// forceTLS: true
// });

View File

@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<!DOCTYPE html>
<html>
@section('htmlheader')
@include('architect::layouts.partials.htmlheader')
@show
@ -44,4 +44,4 @@
@yield('page-scripts')
@show
</body>
</html>
</html>

View File

@ -1,18 +1,21 @@
<!DOCTYPE html>
<html>
@section('htmlheader')
@include('architect::layouts.partials.htmlheader')
@show
@section('htmlheader')
@include('architect::layouts.partials.htmlheader')
@show
<body class="hold-transition login-page">
<div id="app">
@yield('content')
</div>
<body class="hold-transition login-page">
<div id="app">
@yield('content')
</div>
@section('scripts')
@include('architect::auth.partials.scripts')
@section('scripts')
@include('architect::auth.partials.scripts')
@yield('page-scripts')
@show
</body>
</html>
{{-- Scripts --}}
{!! Asset::scripts() !!}
@yield('page-scripts')
@show
</body>
</html>

View File

@ -1,4 +1,4 @@
@extends('architect::layouts.dn')
@extends('layouts.dn')
@section('page_title')
{{ $dn }}

View File

@ -8,4 +8,4 @@
<!-- Your Page Content Here -->
@yield('main-content')
</div>
</div>
</div>

View File

@ -1,8 +1,9 @@
<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\APIController;
/*
|--------------------------------------------------------------------------
| API Routes
@ -15,8 +16,8 @@ use Illuminate\Support\Facades\Route;
*/
Route::group([],function() {
Route::get('/bases','APIController@bases');
Route::get('/children','APIController@children');
Route::get('/bases',[APIController::class,'bases']);
Route::get('/children',[APIController::class,'children']);
});
Route::group(['middleware'=>'auth:api','prefix'=>'user'],function() {

View File

@ -2,6 +2,9 @@
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\Auth\LoginController;
/*
|--------------------------------------------------------------------------
| Web Routes
@ -23,14 +26,14 @@ Route::group(['prefix' => LaravelLocalization::setLocale()], function() {
'register' => FALSE,
]);
Route::get('home','HomeController@home');
Route::get('info','HomeController@info');
Route::post('render','HomeController@render');
Route::get('home',[HomeController::class,'home']);
Route::get('info',[HomeController::class,'info']);
Route::post('render',[HomeController::class,'render']);
});
Route::redirect('/','home');
Route::get('logout','Auth\LoginController@logout');
Route::get('logout',[LoginController::class,'logout']);
Route::group(['prefix'=>'user'],function() {
Route::get('image','HomeController@user_image');
Route::get('image',[HomeController::class,'user_image']);
});

View File

@ -3,7 +3,6 @@
namespace Tests\Feature;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ExampleTest extends TestCase
{

View File

@ -7,4 +7,16 @@ use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;
/**
* Hack to get testing working
*/
protected function tearDown(): void
{
$config = app('config');
$events = app('events');
parent::tearDown();
app()->instance('config', $config);
app()->instance('events', $events);
}
}

View File

@ -0,0 +1,19 @@
<?php
namespace Tests\Unit;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ExampleTest extends TestCase
{
/**
* A basic test example.
*
* @return void
*/
public function testBasicTest()
{
$this->assertTrue(true);
}
}

View File

@ -2,9 +2,6 @@
namespace Tests\Unit;
use Illuminate\Support\Collection;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
use App\Ldap\Entry;
@ -24,6 +21,6 @@ class GetBaseDNTest extends TestCase
$this->assertIsObject($o);
$this->assertCount(1,$o->toArray());
$this->assertContains('dc=Test',$o->toArray());
$this->assertEquals('dc=Test',$o->first()->getDn());
}
}

View File

@ -2,8 +2,6 @@
namespace Tests\Unit;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
use App\Classes\LDAP\Server;