public function __construct($singular_name, $pluralize = true, Phactory $phactory) { $this->_singular = $singular_name; if ($pluralize) { $this->_name = Inflector::pluralize($singular_name); } else { $this->_name = $singular_name; } $this->_collection = $phactory->getDb()->selectCollection($this->_name); }
public function testGetDb() { $db = Phactory::getDb(); $this->assertInstanceOf('MongoDB', $db); }