public function testGetMappedClass() { // Should return null $definition = new Src\Definition(array('attribute' => 'attribute', 'key' => 'key', 'accessor' => 'accessor', 'mutator' => 'mutator')); $this->assert->variable($definition->getMappedType())->isNull(); // Should return the FQDN of the single embedded document with the beginning \ $definition = new Src\Definition(array('attribute' => 'attribute', 'key' => 'key', 'accessor' => 'accessor', 'mutator' => 'mutator', 'type' => 'User\\Namespace\\Object')); $this->assert->string($definition->getMappedClass())->isEqualTo('\\User\\Namespace\\Object'); // Should return the document FQDN of an embedded collection with the beginning \ $definition = new Src\Definition(array('attribute' => 'attribute', 'key' => 'key', 'accessor' => 'accessor', 'mutator' => 'mutator', 'type' => 'array', 'mappedClass' => 'User\\Namespace\\Object')); $this->assert->string($definition->getMappedClass())->isEqualTo('\\User\\Namespace\\Object'); }