Beispiel #1
0
 public function updateInstallScripts(Install $originalInstall, Collection $patched, $patchCount)
 {
     if ($patchCount >= 0) {
         $last = $patched->count() - 1;
         $patched = $patched->getIterator();
         /** @var Patch $lastPatch */
         $lastPatch = $patched->offsetGet($last);
         $table = $lastPatch->getTable();
         $postPatchInstall = $this->repository->buildInstallFromDatabase($table);
         $newInstall = $this->factory->createInstall(['table' => $table, 'patch' => $lastPatch->getPatch(), 'install' => $postPatchInstall->getInstall()]);
         $this->fileMap->updateInstall($originalInstall, $newInstall);
     }
 }
Beispiel #2
0
 /**
  * @dataProvider thingProvider
  * @param $patches
  */
 public function testCount($patches)
 {
     $collection = new Collection($patches);
     $this->assertEquals(count($patches), $collection->count());
 }