/** * DynamicField 제거 * * @param ConfigEntity $config config entity * @return void */ public function drop(ConfigEntity $config) { $this->connection->beginTransaction(); $this->configHandler->remove($config); $type = $this->registerHandler->getType($this, $config->get('typeId')); $type->setConfig($config); $type->drop(); $this->connection->commit(); }
/** * test config put * * @return void */ public function testRemove() { $conn = m::mock('Xpressengine\\Database\\VirtualConnectionInterface'); $configManager = m::mock('Xpressengine\\Config\\ConfigManager'); $configManager->shouldReceive('remove'); $handler = new ConfigHandler($conn, $configManager); $config = m::mock('Xpressengine\\Config\\ConfigEntity'); $config->shouldReceive('get')->with('group')->andReturn('group'); $config->shouldReceive('get')->with('id')->andReturn('id'); $handler->remove($config); }