File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public function boot()
4343
4444 if (config ('ldap.cache.enabled ' , false )) {
4545 $ connection ->setCache (
46- cache ()->repository (config ('ldap.cache.driver ' ))
46+ cache ()->driver (config ('ldap.cache.driver ' ))
4747 );
4848 }
4949
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace LdapRecord \Laravel \Tests ;
4+
5+ use Illuminate \Log \LogManager ;
6+ use LdapRecord \Container ;
7+ use LdapRecord \Query \Cache ;
8+
9+ class LdapServiceProviderTest extends TestCase
10+ {
11+ protected function getEnvironmentSetup ($ app )
12+ {
13+ parent ::getEnvironmentSetup ($ app );
14+
15+ $ app ['config ' ]->set ('ldap.logging ' , true );
16+ $ app ['config ' ]->set ('ldap.cache.enabled ' , true );
17+ }
18+
19+ public function test_logger_is_set_on_container_when_enabled ()
20+ {
21+ $ this ->assertInstanceOf (LogManager::class, Container::getLogger ());
22+ }
23+
24+ public function test_cache_is_set_on_connection_when_enabled ()
25+ {
26+ foreach (Container::getInstance ()->all () as $ connection ) {
27+ $ this ->assertInstanceOf (Cache::class, $ connection ->getCache ());
28+ }
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments