示例#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
文件: LocatorTest.php 项目: itkg/core
 public function testFindScriptsWithUnvalidScriptName()
 {
     $locator = new Locator();
     $locator->setParams(array('path' => TEST_BASE_DIR, 'release' => 'data', 'scriptName' => 'none'));
     $this->assertEmpty($locator->findScripts());
 }