public function load($type)
{
switch ($type) {
case 'git':
$adapter = new Adapter\Git();
break;
case 'basic':
$adapter = new Adapter\Basic();
break;
}
if (empty($adapter)) {
return false;
}
$this->adapter = $adapter;
return true;
}
/** * Test * * @return void */ public function testExecuteScripts() { file_put_contents($this->fileName, '<?php echo "test";'); $this->object->load('git'); $this->assertTrue($this->object->executeScripts()); unlink($this->fileName); }