public function __construct(Factory $factory, $documentClass) { $this->configClass = $factory->getConfigClass($documentClass); if (!$this->configClass) { var_dump($this->configClass); } $this->factory = $factory; $this->class = $documentClass; $this->parseAndCheckFields(); $this->parseAndCheckReferences(); $this->parseAndCheckEmbeddeds(); if (!$this->isEmbedded()) { $field = array('type' => 'raw'); $this->parseField($field, 'id'); } }
public function testConfigs() { $factory = new Factory($this->mongator, $this->faker); $this->assertTrue(is_array($factory->getConfigClass('Model\\Article'))); }