Пример #1
0
 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());
 }
Пример #2
0
 public function testFindScriptsWithUnvalidScriptName()
 {
     $locator = new Locator();
     $locator->setParams(array('path' => TEST_BASE_DIR, 'release' => 'data', 'scriptName' => 'none'));
     $this->assertEmpty($locator->findScripts());
 }