@@ 38-51 (lines=14) @@ | ||
35 | ); |
|
36 | } |
|
37 | ||
38 | public function testFetchBranch() |
|
39 | { |
|
40 | $wrapped = m::mock('DevBoardLib\GithubApiFacade\Repo\RepoFacade'); |
|
41 | $wrapped->shouldReceive('fetchBranch') |
|
42 | ->with('master') |
|
43 | ->andReturn($this->getDataProvider()->getBranch()); |
|
44 | ||
45 | $target = $this->createFacade($wrapped); |
|
46 | ||
47 | self::assertInstanceOf( |
|
48 | 'DevBoardLib\GithubCore\Branch\GithubBranchSource', |
|
49 | $target->fetchBranch('master') |
|
50 | ); |
|
51 | } |
|
52 | ||
53 | public function testFetchAllBranches() |
|
54 | { |
|
@@ 87-100 (lines=14) @@ | ||
84 | } |
|
85 | } |
|
86 | ||
87 | public function testFetchCommit() |
|
88 | { |
|
89 | $wrapped = m::mock('DevBoardLib\GithubApiFacade\Repo\RepoFacade'); |
|
90 | $wrapped->shouldReceive('fetchCommit') |
|
91 | ->with('sha123') |
|
92 | ->andReturn($this->getDataProvider()->getCommit()); |
|
93 | ||
94 | $target = $this->createFacade($wrapped); |
|
95 | ||
96 | self::assertInstanceOf( |
|
97 | 'DevBoardLib\GithubCore\Commit\GithubCommitSource', |
|
98 | $target->fetchCommit('sha123') |
|
99 | ); |
|
100 | } |
|
101 | ||
102 | /** |
|
103 | */ |
|
@@ 104-119 (lines=16) @@ | ||
101 | ||
102 | /** |
|
103 | */ |
|
104 | public function testFetchCommitStatus() |
|
105 | { |
|
106 | $wrapped = m::mock('DevBoardLib\GithubApiFacade\Repo\RepoFacade'); |
|
107 | $wrapped->shouldReceive('fetchCommitStatus') |
|
108 | ->with('sha123') |
|
109 | ->andReturn($this->getDataProvider()->getCommitStatus()); |
|
110 | ||
111 | $target = $this->createFacade($wrapped); |
|
112 | ||
113 | foreach ($target->fetchCommitStatus('sha123') as $status) { |
|
114 | self::assertInstanceOf( |
|
115 | 'DevBoardLib\GithubCore\CommitStatus\GithubCommitStatusSource', |
|
116 | $status |
|
117 | ); |
|
118 | } |
|
119 | } |
|
120 | ||
121 | public function testFetchCommitStatuses() |
|
122 | { |
|
@@ 121-136 (lines=16) @@ | ||
118 | } |
|
119 | } |
|
120 | ||
121 | public function testFetchCommitStatuses() |
|
122 | { |
|
123 | $wrapped = m::mock('DevBoardLib\GithubApiFacade\Repo\RepoFacade'); |
|
124 | $wrapped->shouldReceive('fetchCommitStatuses') |
|
125 | ->with('sha123') |
|
126 | ->andReturn($this->getDataProvider()->getCommitStatuses()); |
|
127 | ||
128 | $target = $this->createFacade($wrapped); |
|
129 | ||
130 | foreach ($target->fetchCommitStatuses('sha123') as $status) { |
|
131 | self::assertInstanceOf( |
|
132 | 'DevBoardLib\GithubCore\CommitStatus\GithubCommitStatusSource', |
|
133 | $status |
|
134 | ); |
|
135 | } |
|
136 | } |
|
137 | // |
|
138 | // |
|
139 | // |