sources() public method

Returns the list of collections in the currently-connected database.
public sources ( string $class = null ) : array
$class string The fully-name-spaced class name of the model object making the request.
return array Returns an array of objects to which models can connect.
Esempio n. 1
0
 public function testSourcesNoConnectionException()
 {
     $db = new MongoDb(array('host' => null, 'autoConnect' => false));
     $this->assertException('Could not connect to the database.', function () use($db) {
         $db->sources(null);
     });
 }
 public function testSourcesNoConnectionException()
 {
     $db = new MongoDb(array('host' => null, 'autoConnect' => false));
     $this->expectException('Could not connect to the database.');
     $result = $db->sources(null);
 }