blob: f529430997a1821c7d9af0a75d7583db1d79b62b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<?php
use PHPGit\Git;
require_once __DIR__ . '/../BaseTestCase.php';
class FetchCommandTest extends BaseTestCase
{
public function testFetch()
{
$git = new Git();
$git->init($this->directory);
$git->setRepository($this->directory);
$git->remote->add('origin', 'https://github.com/kzykhys/Text.git');
$git->fetch('origin', '+refs/heads/*:refs/remotes/origin/*');
$tags = $git->tag();
$this->assertContains('v1.0.0', $tags);
}
public function testFetchAll()
{
$git = new Git();
$git->init($this->directory);
$git->setRepository($this->directory);
$git->remote->add('origin', 'https://github.com/kzykhys/Text.git');
$git->fetch->all();
$tags = $git->tag();
$this->assertContains('v1.0.0', $tags);
}
}
|