Example #1
0
 public function testGetMappedNamespace()
 {
     // Should return the namespace part without the class name for a 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->getMappedNamespace())->isEqualTo('\\User\\Namespace');
     // Should return the namespace part without the class name for 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->getMappedNamespace())->isEqualTo('\\User\\Namespace');
 }