Example #1
0
 public function testMigratePreExistingWhippetJson()
 {
     $dir = $this->getDir();
     touch($dir . '/whippet.json');
     file_put_contents($dir . '/plugins', implode("\n", ['source = "git@git.dxw.net:wordpress-plugins/"', 'twitget=']));
     $migration = new \Dxw\Whippet\Dependencies\Migration($this->getFactory(), $this->getProjectDirectory($dir));
     ob_start();
     $result = $migration->migrate();
     $output = ob_get_clean();
     $this->assertTrue($result->isErr());
     $this->assertEquals('will not overwrite existing whippet.json', $result->getErr());
     $this->assertEquals('', $output);
 }
Example #2
0
 public function migrate()
 {
     $dir = new \Dxw\Whippet\ProjectDirectory(getcwd());
     $migration = new \Dxw\Whippet\Dependencies\Migration($this->factory, $dir);
     $this->exitIfError($migration->migrate());
 }