Exemplo n.º 1
0
 public function testSharedSetAndGetDefinition()
 {
     $this->assertFalse($this->object->has('test'));
     $def = ClassDefinition::factory('stdClass');
     $this->object->set('test', $def->setShared(true));
     $this->assertTrue($this->object->has('test'));
     $inst = $this->object->get('test');
     $this->assertInstanceOf('\\stdClass', $inst);
     $this->assertTrue($inst === $this->object->get('test'));
 }