예제 #1
0
 public function testRebaseSkip()
 {
     $filesystem = new Filesystem();
     $git = new Git();
     $git->init($this->directory);
     $git->setRepository($this->directory);
     $filesystem->dumpFile($this->directory . '/test.txt', 'foo');
     $git->add('test.txt');
     $git->commit('initial commit');
     $git->checkout->create('next');
     $filesystem->dumpFile($this->directory . '/test.txt', 'bar');
     $git->add('test.txt');
     $git->commit('next commit');
     $git->checkout('master');
     $filesystem->dumpFile($this->directory . '/test.txt', 'baz');
     $git->add('test.txt');
     $git->commit('master commit');
     try {
         $git->rebase('next');
         $this->fail('GitException should be thrown');
     } catch (\PHPGit\Exception\GitException $e) {
     }
     $git->rebase->skip();
 }