Skip to content

Commit ba68b43

Browse files
committed
Unit tests for fetching directory listings and patch files
1 parent 37dccaf commit ba68b43

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/ClientTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,22 @@ public function testFetchFileRevision()
5757

5858
$this->expectPromiseReject($promise);
5959
}
60+
61+
public function testFetchDirectoryRevision()
62+
{
63+
$this->browser->expects($this->once())->method('get')->with($this->equalTo('http://viewvc.example.org/directory/?pathrev=1.0'))->will($this->returnValue($this->createPromiseRejected()));
64+
65+
$promise = $this->client->fetchDirectory('/directory/', '1.0');
66+
67+
$this->expectPromiseReject($promise);
68+
}
69+
70+
public function testFetchPatch()
71+
{
72+
$this->browser->expects($this->once())->method('get')->with($this->equalTo('http://viewvc.example.org/README.md?view=patch&r1=1.0&r2=1.1'))->will($this->returnValue($this->createPromiseRejected()));
73+
74+
$promise = $this->client->fetchPatch('/README.md', '1.0', '1.1');
75+
76+
$this->expectPromiseReject($promise);
77+
}
6078
}

0 commit comments

Comments
 (0)