Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit 93e2eb5

Browse files
committed
Added test model
1 parent c494db5 commit 93e2eb5

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

tests/FunctionalTestCase.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ protected function getEnvironmentSetup($app)
3939
$app['config']->set('adldap.auto_connect', false);
4040

4141
$app['config']->set('auth.driver', 'adldap');
42+
$app['config']->set('auth.model', 'Adldap\Laravel\Tests\Models\User');
4243
}
4344

4445
/**

tests/Models/User.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
namespace Adldap\Laravel\Tests\Models;
4+
5+
use Illuminate\Auth\Authenticatable;
6+
use Illuminate\Database\Eloquent\Model;
7+
use Illuminate\Auth\Passwords\CanResetPassword;
8+
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
9+
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
10+
11+
class User extends Model implements AuthenticatableContract, CanResetPasswordContract
12+
{
13+
use Authenticatable, CanResetPassword;
14+
15+
/**
16+
* The database table used by the model.
17+
*
18+
* @var string
19+
*/
20+
protected $table = 'users';
21+
22+
/**
23+
* The attributes that are mass assignable.
24+
*
25+
* @var array
26+
*/
27+
protected $fillable = ['name', 'email', 'password'];
28+
29+
/**
30+
* The attributes excluded from the model's JSON form.
31+
*
32+
* @var array
33+
*/
34+
protected $hidden = ['password', 'remember_token'];
35+
}

0 commit comments

Comments
 (0)