load('database.default'),array( 'caching'=>$caching, )); $x = LDAP::factory('user',NULL,$connection); $x->connect(); // We'll do a query first. $u = $x->search(array('')) ->scope('base') ->cached($cached,$force) ->execute(); $u = $x->search(array('')) ->scope('base') ->cached($cached,$force) ->execute(); if (! Kohana::$caching OR $expect) { $this->assertInstanceOf('Database_LDAP_Result',$u['']); } else { $this->assertInstanceOf('Database_LDAP_Result_Cached',$u['']); } $x->disconnect(); } }