public function testRemove()
 {
     $object = $this->getMockBuilder('NewClass')->getMock();
     $this->IRegistry->set('test', $object);
     $this->assertInstanceOf('Ignaszak\\Registry\\Scope\\IRegistry', $this->IRegistry->remove('test'));
     $this->assertNull($this->IRegistry->get('test'));
 }
Beispiel #2
0
 /**
  * {@inheritDoc}
  * @see \Ignaszak\Registry\IRegistry::remove($name)
  */
 public function remove(string $name) : IRegistry
 {
     $tmpFile = Conf::getTmpPath() . "/IgnaszakRegistry_{$name}.tmp";
     if (file_exists($tmpFile)) {
         unlink($tmpFile);
     }
     return parent::remove($name);
 }