Sokil\Mongo\Collection::getDatabase PHP Method

getDatabase() public method

public getDatabase ( ) : Database
return Database
    public function getDatabase()
    {
        return $this->database;
    }

Usage Example

Esempio n. 1
0
 public function testOnAfterConstruct()
 {
     $collectionMock = $this->getMock('\\Sokil\\Mongo\\Collection', array('getDocumentClassName'), array($this->collection->getDatabase(), 'phpmongo_test_collection'));
     $collectionMock->expects($this->once())->method('getDocumentClassName')->will($this->returnValue('\\Sokil\\Mongo\\DocumentWithAfterConstructEvent'));
     $document = $collectionMock->createDocument();
     $this->assertEquals(true, $document->status);
 }
All Usage Examples Of Sokil\Mongo\Collection::getDatabase