예제 #1
0
 public function testRemoteRm()
 {
     $git = new Git();
     $git->init($this->directory);
     $git->setRepository($this->directory);
     $git->remote->add('origin', 'https://github.com/kzykhys/Text.git');
     $git->remote->rm('origin');
     $remotes = $git->remote();
     $this->assertEquals(array(), $remotes);
 }
예제 #2
0
 public function testSetUrlDelete()
 {
     $git = new Git();
     $git->init($this->directory);
     $git->setRepository($this->directory);
     $git->remote->add('origin', 'http://example.com/test.git');
     $git->remote->url->add('origin', 'https://github.com/kzykhys/Text.git');
     $git->remote->url->delete('origin', 'https://github.com');
     $remotes = $git->remote();
     $this->assertEquals('http://example.com/test.git', $remotes['origin']['fetch']);
 }