public function testCheck() { $checker = $this->getMock('Itkg\\Core\\Command\\DatabaseUpdate\\ReleaseChecker', array('checkScripts', 'checkScript')); $checker->expects($this->once())->method('checkScripts'); $checker->expects($this->once())->method('checkScript'); $locator = new Locator(); $locator->setParams(array('path' => TEST_BASE_DIR, 'release' => 'data')); $checker->check($locator->findScripts(), $locator->findRollbackScripts()); }
public function testFindScriptsWithUnvalidScriptName() { $locator = new Locator(); $locator->setParams(array('path' => TEST_BASE_DIR, 'release' => 'data', 'scriptName' => 'none')); $this->assertEmpty($locator->findScripts()); }