| @@ 81-91 (lines=11) @@ | ||
| 78 | return static::$responses[ $endpoint ]; |
|
| 79 | } |
|
| 80 | ||
| 81 | protected function set_get_refs_heads_master( $succeed ) { |
|
| 82 | $this->set_endpoint( |
|
| 83 | function ( $request ) { |
|
| 84 | if ( '[]' === $request['body'] ) { |
|
| 85 | return false; |
|
| 86 | } |
|
| 87 | ||
| 88 | return true; |
|
| 89 | }, $succeed ? '200 OK' : '404 Not Found', $succeed |
|
| 90 | ); |
|
| 91 | } |
|
| 92 | ||
| 93 | protected function set_get_commits( $succeed ) { |
|
| 94 | $this->set_endpoint( |
|
| @@ 93-103 (lines=11) @@ | ||
| 90 | ); |
|
| 91 | } |
|
| 92 | ||
| 93 | protected function set_get_commits( $succeed ) { |
|
| 94 | $this->set_endpoint( |
|
| 95 | function ( $request ) { |
|
| 96 | if ( '[]' === $request['body'] ) { |
|
| 97 | return false; |
|
| 98 | } |
|
| 99 | ||
| 100 | return true; |
|
| 101 | }, $succeed ? '200 OK' : '404 Not Found', $succeed, 'db2510854e6aeab68ead26b48328b19f4bdf926e' |
|
| 102 | ); |
|
| 103 | } |
|
| 104 | ||
| 105 | protected function set_get_trees( $succeed, $sha = '' ) { |
|
| 106 | $this->set_endpoint( |
|
| @@ 105-116 (lines=12) @@ | ||
| 102 | ); |
|
| 103 | } |
|
| 104 | ||
| 105 | protected function set_get_trees( $succeed, $sha = '' ) { |
|
| 106 | $this->set_endpoint( |
|
| 107 | function ( $request ) { |
|
| 108 | if ( '[]' === $request['body'] ) { |
|
| 109 | return false; |
|
| 110 | } |
|
| 111 | ||
| 112 | return true; |
|
| 113 | }, $succeed ? '200 OK' : '422 Unprocessable Entity', $succeed, |
|
| 114 | $sha ? $sha : '9108868e3800bec6763e51beb0d33e15036c3626' |
|
| 115 | ); |
|
| 116 | } |
|
| 117 | ||
| 118 | protected function set_get_blobs( $succeed ) { |
|
| 119 | $shas = array( |
|