File tree Expand file tree Collapse file tree 4 files changed +42
-3
lines changed
Expand file tree Collapse file tree 4 files changed +42
-3
lines changed Original file line number Diff line number Diff line change 77<p align =" center " >Integrate LDAP into your Lumen application.</p >
88
99<p align =" center " >
10- <a href="https://laravel.com"><img src="https://img.shields.io/badge/Built_for-Laravel -green.svg?style=flat-square"></a>
10+ <a href="https://lumen. laravel.com"><img src="https://img.shields.io/badge/Built_for-Lumen -green.svg?style=flat-square"></a>
1111 <a href="https://travis-ci.com/directorytree/ldaprecord-lumen"><img src="https://img.shields.io/travis/directorytree/ldaprecord-lumen.svg?style=flat-square"></a>
1212 <a href="https://scrutinizer-ci.com/g/directorytree/ldaprecord-lumen"><img src="https://img.shields.io/scrutinizer/g/directorytree/ldaprecord-lumen/master.svg?style=flat-square"></a>
1313 <a href="https://packagist.org/packages/directorytree/ldaprecord-lumen"><img src="https://img.shields.io/packagist/dt/directorytree/ldaprecord-lumen.svg?style=flat-square"></a>
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace LdapRecord \Lumen \Tests ;
4+
5+ use LdapRecord \Container ;
6+ use LdapRecord \Connection ;
7+ use LdapRecord \Lumen \LdapServiceProvider ;
8+
9+ class LdapServiceProviderTest extends TestCase
10+ {
11+ protected function setUp (): void
12+ {
13+ parent ::setUp ();
14+
15+ config (['ldap.default ' => 'default ' ]);
16+ config (['ldap.connections.default ' => [
17+ 'hosts ' => ['localhost ' ],
18+ 'username ' => 'user ' ,
19+ 'password ' => 'secret ' ,
20+ ]]);
21+
22+ app ()->register (LdapServiceProvider::class);
23+ }
24+
25+ public function test_connections_are_registered ()
26+ {
27+ $ this ->assertIsArray ($ connections = Container::getInstance ()->all ());
28+ $ this ->assertCount (1 , $ connections );
29+
30+ $ this ->assertInstanceOf (Connection::class, $ default = $ connections ['default ' ]);
31+ $ this ->assertEquals (['localhost ' ], $ default ->getConfiguration ()->get ('hosts ' ));
32+ }
33+ }
Original file line number Diff line number Diff line change 33namespace LdapRecord \Lumen \Tests ;
44
55use Illuminate \Filesystem \Filesystem ;
6+ use LdapRecord \Lumen \LdapServiceProvider ;
67
78class MakeLdapConfigTest extends TestCase
89{
10+ protected function setUp (): void
11+ {
12+ parent ::setUp ();
13+
14+ app ()->register (LdapServiceProvider::class);
15+ }
16+
917 protected function tearDown (): void
1018 {
1119 $ this ->deleteConfigStub ();
Original file line number Diff line number Diff line change 7373|
7474*/
7575
76- $ app ->register (\LdapRecord \Lumen \LdapServiceProvider::class);
77- $ app ->register (\LdapRecord \Lumen \LdapAuthServiceProvider::class);
7876
7977/*
8078|--------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments