Move our sample schema/data into a tests/server, we'll use osixia/openldap for the demo/testing

This commit is contained in:
Deon George
2023-01-27 15:26:29 +11:00
parent 181a57586c
commit d0242ce3d8
21 changed files with 281 additions and 2092 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace Tests\Feature;
use LdapRecord\Container;
use LdapRecord\Testing\DirectoryFake;
use Tests\TestCase;
class LoginTest extends TestCase
{
public function test_user_can_view_a_login_form()
{
$response = $this->get('/login');
$response->assertSuccessful();
$response->assertViewIs('architect::auth.login');
}
public function test_admin_dn_login()
{
$username = 'cn=Admin,dc=Test';
$password = 'test';
//DirectoryFake::setup();
$connection = Container::getDefaultConnection();
$this->assertTrue($connection->auth()->attempt($username,$password));
}
}