TestRailMock.pm 59 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202
  1. # ABSTRACT: Provides an interface to something like TestRail's REST api in a bogus fashion
  2. # PODNAME: Test::LWP::UserAgent::TestRailMock
  3. package Test::LWP::UserAgent::TestRailMock;
  4. use strict;
  5. use warnings;
  6. use Test::LWP::UserAgent;
  7. use HTTP::Response;
  8. use HTTP::Request;
  9. use HTTP::Headers;
  10. =head1 DESCRIPTION
  11. Provides a Test::LWP::UserAgent with mappings defined for all the requests made by this module's main test.
  12. More or less provides a successful response with bogus data for every API call exposed by TestRail::API.
  13. Used primarily by said module's tests (whenever the test environment does not provide a TestRail server to test against).
  14. You probably won't need/want to use it, but you can by following the SYNOPSIS.
  15. The module was mostly auto-generated, with a few manual tweaks.
  16. =head1 SYNOPSIS
  17. use Test::LWP::UserAgent::TestRailMock;
  18. use TestRail::API;
  19. my $tr = TestRail::API->new('http://testrail.local','teodesian@cpan.org','bogus',0);
  20. $tr->{'browser'} = $Test::LWP::UserAgent::TestRailMock::mockObject;
  21. =cut
  22. #Use this as the ->{'browser'} param of the TestRail::API object
  23. our $mockObject = Test::LWP::UserAgent->new();
  24. my ($VAR1,$VAR2,$VAR3,$VAR4,$VAR5);
  25. {
  26. $VAR1 = 'http://hokum.bogus/index.php?/api/v2/get_users';
  27. $VAR2 = 500;
  28. $VAR3 = 'Can\'t connect to hokum.bogus:80 (Bad hostname)';
  29. $VAR4 = bless( {
  30. 'client-warning' => 'Internal response',
  31. 'client-date' => 'Tue, 23 Dec 2014 20:02:08 GMT',
  32. 'content-type' => 'text/plain',
  33. '::std_case' => {
  34. 'client-warning' => 'Client-Warning',
  35. 'client-date' => 'Client-Date'
  36. }
  37. }, 'HTTP::Headers' );
  38. $VAR5 = 'Can\'t connect to hokum.bogus:80 (Bad hostname)
  39. LWP::Protocol::http::Socket: Bad hostname \'hokum.bogus\' at /usr/share/perl5/LWP/Protocol/http.pm line 51.
  40. ';
  41. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  42. }
  43. {
  44. $VAR1 = 'index.php?/api/v2/get_users';
  45. $VAR2 = '200';
  46. $VAR3 = 'OK';
  47. $VAR4 = bless( {
  48. 'connection' => 'close',
  49. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  50. 'client-response-num' => 1,
  51. 'date' => 'Tue, 23 Dec 2014 20:02:08 GMT',
  52. 'client-peer' => '192.168.122.217:80',
  53. 'content-length' => '70',
  54. '::std_case' => {
  55. 'client-date' => 'Client-Date',
  56. 'x-powered-by' => 'X-Powered-By',
  57. 'client-response-num' => 'Client-Response-Num',
  58. 'client-peer' => 'Client-Peer'
  59. },
  60. 'client-date' => 'Tue, 23 Dec 2014 20:02:08 GMT',
  61. 'content-type' => 'application/json; charset=utf-8',
  62. 'server' => 'Apache/2.4.7 (Ubuntu)'
  63. }, 'HTTP::Headers' );
  64. $VAR5 = '[{"id":1,"name":"teodesian","email":"teodesian@cpan.org","is_active":true}]';
  65. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  66. }
  67. {
  68. $VAR1 = 'noSuchMethod';
  69. $VAR2 = '404';
  70. $VAR3 = 'Not Found';
  71. $VAR4 = bless( {
  72. 'connection' => 'close',
  73. 'client-response-num' => 1,
  74. 'date' => 'Tue, 23 Dec 2014 20:02:08 GMT',
  75. 'client-peer' => '192.168.122.217:80',
  76. 'content-length' => '289',
  77. '::std_case' => {
  78. 'client-date' => 'Client-Date',
  79. 'client-response-num' => 'Client-Response-Num',
  80. 'title' => 'Title',
  81. 'client-peer' => 'Client-Peer'
  82. },
  83. 'client-date' => 'Tue, 23 Dec 2014 20:02:08 GMT',
  84. 'content-type' => 'text/html; charset=iso-8859-1',
  85. 'title' => '404 Not Found',
  86. 'server' => 'Apache/2.4.7 (Ubuntu)'
  87. }, 'HTTP::Headers' );
  88. $VAR5 = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  89. <html><head>
  90. <title>404 Not Found</title>
  91. </head><body>
  92. <h1>Not Found</h1>
  93. <p>The requested URL /noSuchMethod was not found on this server.</p>
  94. <hr>
  95. <address>Apache/2.4.7 (Ubuntu) Server at testrail.local Port 80</address>
  96. </body></html>
  97. ';
  98. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  99. }
  100. {
  101. $VAR1 = 'index.php?/api/v2/add_project';
  102. $VAR2 = '200';
  103. $VAR3 = 'OK';
  104. $VAR4 = bless( {
  105. 'connection' => 'close',
  106. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  107. 'client-response-num' => 1,
  108. 'date' => 'Tue, 23 Dec 2014 20:02:08 GMT',
  109. 'client-peer' => '192.168.122.217:80',
  110. 'content-length' => '236',
  111. '::std_case' => {
  112. 'client-date' => 'Client-Date',
  113. 'x-powered-by' => 'X-Powered-By',
  114. 'client-response-num' => 'Client-Response-Num',
  115. 'client-peer' => 'Client-Peer'
  116. },
  117. 'client-date' => 'Tue, 23 Dec 2014 20:02:08 GMT',
  118. 'content-type' => 'application/json; charset=utf-8',
  119. 'server' => 'Apache/2.4.7 (Ubuntu)'
  120. }, 'HTTP::Headers' );
  121. $VAR5 = '{"id":9,"name":"CRUSH ALL HUMANS","announcement":"Robo-Signed Soviet 5 Year Project","show_announcement":false,"is_completed":false,"completed_on":null,"suite_mode":3,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/projects\\/overview\\/9"}';
  122. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  123. }
  124. {
  125. $VAR1 = 'index.php?/api/v2/get_projects';
  126. $VAR2 = '200';
  127. $VAR3 = 'OK';
  128. $VAR4 = bless( {
  129. 'connection' => 'close',
  130. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  131. 'client-response-num' => 1,
  132. 'date' => 'Tue, 23 Dec 2014 20:02:08 GMT',
  133. 'client-peer' => '192.168.122.217:80',
  134. 'content-length' => '238',
  135. '::std_case' => {
  136. 'client-date' => 'Client-Date',
  137. 'x-powered-by' => 'X-Powered-By',
  138. 'client-response-num' => 'Client-Response-Num',
  139. 'client-peer' => 'Client-Peer'
  140. },
  141. 'client-date' => 'Tue, 23 Dec 2014 20:02:08 GMT',
  142. 'content-type' => 'application/json; charset=utf-8',
  143. 'server' => 'Apache/2.4.7 (Ubuntu)'
  144. }, 'HTTP::Headers' );
  145. $VAR5 = '[{"id":9,"name":"CRUSH ALL HUMANS","announcement":"Robo-Signed Soviet 5 Year Project","show_announcement":false,"is_completed":false,"completed_on":null,"suite_mode":3,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/projects\\/overview\\/9"}]';
  146. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  147. }
  148. {
  149. $VAR1 = 'index.php?/api/v2/add_suite/9';
  150. $VAR2 = '200';
  151. $VAR3 = 'OK';
  152. $VAR4 = bless( {
  153. 'connection' => 'close',
  154. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  155. 'client-response-num' => 1,
  156. 'date' => 'Tue, 23 Dec 2014 20:02:08 GMT',
  157. 'client-peer' => '192.168.122.217:80',
  158. 'content-length' => '254',
  159. '::std_case' => {
  160. 'client-date' => 'Client-Date',
  161. 'x-powered-by' => 'X-Powered-By',
  162. 'client-response-num' => 'Client-Response-Num',
  163. 'client-peer' => 'Client-Peer'
  164. },
  165. 'client-date' => 'Tue, 23 Dec 2014 20:02:08 GMT',
  166. 'content-type' => 'application/json; charset=utf-8',
  167. 'server' => 'Apache/2.4.7 (Ubuntu)'
  168. }, 'HTTP::Headers' );
  169. $VAR5 = '{"id":9,"name":"HAMBURGER-IZE HUMANITY","description":"Robo-Signed Patriotic People\'s TestSuite","project_id":9,"is_master":false,"is_baseline":false,"is_completed":false,"completed_on":null,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/suites\\/view\\/9"}';
  170. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  171. }
  172. {
  173. $VAR1 = 'index.php?/api/v2/get_suites/9';
  174. $VAR2 = '200';
  175. $VAR3 = 'OK';
  176. $VAR4 = bless( {
  177. 'connection' => 'close',
  178. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  179. 'client-response-num' => 1,
  180. 'date' => 'Tue, 23 Dec 2014 20:02:08 GMT',
  181. 'client-peer' => '192.168.122.217:80',
  182. 'content-length' => '256',
  183. '::std_case' => {
  184. 'client-date' => 'Client-Date',
  185. 'x-powered-by' => 'X-Powered-By',
  186. 'client-response-num' => 'Client-Response-Num',
  187. 'client-peer' => 'Client-Peer'
  188. },
  189. 'client-date' => 'Tue, 23 Dec 2014 20:02:08 GMT',
  190. 'content-type' => 'application/json; charset=utf-8',
  191. 'server' => 'Apache/2.4.7 (Ubuntu)'
  192. }, 'HTTP::Headers' );
  193. $VAR5 = '[{"id":9,"name":"HAMBURGER-IZE HUMANITY","description":"Robo-Signed Patriotic People\'s TestSuite","project_id":9,"is_master":false,"is_baseline":false,"is_completed":false,"completed_on":null,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/suites\\/view\\/9"}]';
  194. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  195. }
  196. {
  197. $VAR1 = 'index.php?/api/v2/get_suites/9';
  198. $VAR2 = '200';
  199. $VAR3 = 'OK';
  200. $VAR4 = bless( {
  201. 'connection' => 'close',
  202. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  203. 'client-response-num' => 1,
  204. 'date' => 'Tue, 23 Dec 2014 20:02:08 GMT',
  205. 'client-peer' => '192.168.122.217:80',
  206. 'content-length' => '256',
  207. '::std_case' => {
  208. 'client-date' => 'Client-Date',
  209. 'x-powered-by' => 'X-Powered-By',
  210. 'client-response-num' => 'Client-Response-Num',
  211. 'client-peer' => 'Client-Peer'
  212. },
  213. 'client-date' => 'Tue, 23 Dec 2014 20:02:08 GMT',
  214. 'content-type' => 'application/json; charset=utf-8',
  215. 'server' => 'Apache/2.4.7 (Ubuntu)'
  216. }, 'HTTP::Headers' );
  217. $VAR5 = '[{"id":9,"name":"HAMBURGER-IZE HUMANITY","description":"Robo-Signed Patriotic People\'s TestSuite","project_id":9,"is_master":false,"is_baseline":false,"is_completed":false,"completed_on":null,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/suites\\/view\\/9"}]';
  218. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  219. }
  220. {
  221. $VAR1 = 'index.php?/api/v2/get_suite/9';
  222. $VAR2 = '200';
  223. $VAR3 = 'OK';
  224. $VAR4 = bless( {
  225. 'connection' => 'close',
  226. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  227. 'client-response-num' => 1,
  228. 'date' => 'Tue, 23 Dec 2014 20:02:08 GMT',
  229. 'client-peer' => '192.168.122.217:80',
  230. 'content-length' => '254',
  231. '::std_case' => {
  232. 'client-date' => 'Client-Date',
  233. 'x-powered-by' => 'X-Powered-By',
  234. 'client-response-num' => 'Client-Response-Num',
  235. 'client-peer' => 'Client-Peer'
  236. },
  237. 'client-date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  238. 'content-type' => 'application/json; charset=utf-8',
  239. 'server' => 'Apache/2.4.7 (Ubuntu)'
  240. }, 'HTTP::Headers' );
  241. $VAR5 = '{"id":9,"name":"HAMBURGER-IZE HUMANITY","description":"Robo-Signed Patriotic People\'s TestSuite","project_id":9,"is_master":false,"is_baseline":false,"is_completed":false,"completed_on":null,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/suites\\/view\\/9"}';
  242. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  243. }
  244. {
  245. $VAR1 = 'index.php?/api/v2/add_section/9';
  246. $VAR2 = '200';
  247. $VAR3 = 'OK';
  248. $VAR4 = bless( {
  249. 'connection' => 'close',
  250. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  251. 'client-response-num' => 1,
  252. 'date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  253. 'client-peer' => '192.168.122.217:80',
  254. 'content-length' => '114',
  255. '::std_case' => {
  256. 'client-date' => 'Client-Date',
  257. 'x-powered-by' => 'X-Powered-By',
  258. 'client-response-num' => 'Client-Response-Num',
  259. 'client-peer' => 'Client-Peer'
  260. },
  261. 'client-date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  262. 'content-type' => 'application/json; charset=utf-8',
  263. 'server' => 'Apache/2.4.7 (Ubuntu)'
  264. }, 'HTTP::Headers' );
  265. $VAR5 = '{"id":9,"suite_id":9,"name":"CARBON LIQUEFACTION","description":null,"parent_id":null,"display_order":1,"depth":0}';
  266. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  267. }
  268. {
  269. $VAR1 = 'index.php?/api/v2/get_sections/9&suite_id=9';
  270. $VAR2 = '200';
  271. $VAR3 = 'OK';
  272. $VAR4 = bless( {
  273. 'connection' => 'close',
  274. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  275. 'client-response-num' => 1,
  276. 'date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  277. 'client-peer' => '192.168.122.217:80',
  278. 'content-length' => '116',
  279. '::std_case' => {
  280. 'client-date' => 'Client-Date',
  281. 'x-powered-by' => 'X-Powered-By',
  282. 'client-response-num' => 'Client-Response-Num',
  283. 'client-peer' => 'Client-Peer'
  284. },
  285. 'client-date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  286. 'content-type' => 'application/json; charset=utf-8',
  287. 'server' => 'Apache/2.4.7 (Ubuntu)'
  288. }, 'HTTP::Headers' );
  289. $VAR5 = '[{"id":9,"suite_id":9,"name":"CARBON LIQUEFACTION","description":null,"parent_id":null,"display_order":1,"depth":0}]';
  290. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  291. }
  292. {
  293. $VAR1 = 'index.php?/api/v2/get_sections/9&suite_id=9';
  294. $VAR2 = '200';
  295. $VAR3 = 'OK';
  296. $VAR4 = bless( {
  297. 'connection' => 'close',
  298. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  299. 'client-response-num' => 1,
  300. 'date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  301. 'client-peer' => '192.168.122.217:80',
  302. 'content-length' => '116',
  303. '::std_case' => {
  304. 'client-date' => 'Client-Date',
  305. 'x-powered-by' => 'X-Powered-By',
  306. 'client-response-num' => 'Client-Response-Num',
  307. 'client-peer' => 'Client-Peer'
  308. },
  309. 'client-date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  310. 'content-type' => 'application/json; charset=utf-8',
  311. 'server' => 'Apache/2.4.7 (Ubuntu)'
  312. }, 'HTTP::Headers' );
  313. $VAR5 = '[{"id":9,"suite_id":9,"name":"CARBON LIQUEFACTION","description":null,"parent_id":null,"display_order":1,"depth":0}]';
  314. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  315. }
  316. {
  317. $VAR1 = 'index.php?/api/v2/get_section/9';
  318. $VAR2 = '200';
  319. $VAR3 = 'OK';
  320. $VAR4 = bless( {
  321. 'connection' => 'close',
  322. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  323. 'client-response-num' => 1,
  324. 'date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  325. 'client-peer' => '192.168.122.217:80',
  326. 'content-length' => '114',
  327. '::std_case' => {
  328. 'client-date' => 'Client-Date',
  329. 'x-powered-by' => 'X-Powered-By',
  330. 'client-response-num' => 'Client-Response-Num',
  331. 'client-peer' => 'Client-Peer'
  332. },
  333. 'client-date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  334. 'content-type' => 'application/json; charset=utf-8',
  335. 'server' => 'Apache/2.4.7 (Ubuntu)'
  336. }, 'HTTP::Headers' );
  337. $VAR5 = '{"id":9,"suite_id":9,"name":"CARBON LIQUEFACTION","description":null,"parent_id":null,"display_order":1,"depth":0}';
  338. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  339. }
  340. {
  341. $VAR1 = 'index.php?/api/v2/add_case/9';
  342. $VAR2 = '200';
  343. $VAR3 = 'OK';
  344. $VAR4 = bless( {
  345. 'connection' => 'close',
  346. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  347. 'client-response-num' => 1,
  348. 'date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  349. 'client-peer' => '192.168.122.217:80',
  350. 'content-length' => '320',
  351. '::std_case' => {
  352. 'client-date' => 'Client-Date',
  353. 'x-powered-by' => 'X-Powered-By',
  354. 'client-response-num' => 'Client-Response-Num',
  355. 'client-peer' => 'Client-Peer'
  356. },
  357. 'client-date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  358. 'content-type' => 'application/json; charset=utf-8',
  359. 'server' => 'Apache/2.4.7 (Ubuntu)'
  360. }, 'HTTP::Headers' );
  361. $VAR5 = '{"id":8,"title":"STROGGIFY POPULATION CENTERS","section_id":9,"type_id":6,"priority_id":4,"milestone_id":null,"refs":null,"created_by":1,"created_on":1419364929,"updated_by":1,"updated_on":1419364929,"estimate":null,"estimate_forecast":null,"suite_id":9,"custom_preconds":null,"custom_steps":null,"custom_expected":null}';
  362. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  363. }
  364. {
  365. $VAR1 = 'index.php?/api/v2/get_cases/9&suite_id=9&section_id=9';
  366. $VAR2 = '200';
  367. $VAR3 = 'OK';
  368. $VAR4 = bless( {
  369. 'connection' => 'close',
  370. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  371. 'client-response-num' => 1,
  372. 'date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  373. 'client-peer' => '192.168.122.217:80',
  374. 'content-length' => '322',
  375. '::std_case' => {
  376. 'client-date' => 'Client-Date',
  377. 'x-powered-by' => 'X-Powered-By',
  378. 'client-response-num' => 'Client-Response-Num',
  379. 'client-peer' => 'Client-Peer'
  380. },
  381. 'client-date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  382. 'content-type' => 'application/json; charset=utf-8',
  383. 'server' => 'Apache/2.4.7 (Ubuntu)'
  384. }, 'HTTP::Headers' );
  385. $VAR5 = '[{"id":8,"title":"STROGGIFY POPULATION CENTERS","section_id":9,"type_id":6,"priority_id":4,"milestone_id":null,"refs":null,"created_by":1,"created_on":1419364929,"updated_by":1,"updated_on":1419364929,"estimate":null,"estimate_forecast":null,"suite_id":9,"custom_preconds":null,"custom_steps":null,"custom_expected":null}]';
  386. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  387. }
  388. {
  389. $VAR1 = 'index.php?/api/v2/get_cases/9&suite_id=9&section_id=9';
  390. $VAR2 = '200';
  391. $VAR3 = 'OK';
  392. $VAR4 = bless( {
  393. 'connection' => 'close',
  394. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  395. 'client-response-num' => 1,
  396. 'date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  397. 'client-peer' => '192.168.122.217:80',
  398. 'content-length' => '322',
  399. '::std_case' => {
  400. 'client-date' => 'Client-Date',
  401. 'x-powered-by' => 'X-Powered-By',
  402. 'client-response-num' => 'Client-Response-Num',
  403. 'client-peer' => 'Client-Peer'
  404. },
  405. 'client-date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  406. 'content-type' => 'application/json; charset=utf-8',
  407. 'server' => 'Apache/2.4.7 (Ubuntu)'
  408. }, 'HTTP::Headers' );
  409. $VAR5 = '[{"id":8,"title":"STROGGIFY POPULATION CENTERS","section_id":9,"type_id":6,"priority_id":4,"milestone_id":null,"refs":null,"created_by":1,"created_on":1419364929,"updated_by":1,"updated_on":1419364929,"estimate":null,"estimate_forecast":null,"suite_id":9,"custom_preconds":null,"custom_steps":null,"custom_expected":null}]';
  410. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  411. }
  412. {
  413. $VAR1 = 'index.php?/api/v2/get_case/8';
  414. $VAR2 = '200';
  415. $VAR3 = 'OK';
  416. $VAR4 = bless( {
  417. 'connection' => 'close',
  418. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  419. 'client-response-num' => 1,
  420. 'date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  421. 'client-peer' => '192.168.122.217:80',
  422. 'content-length' => '320',
  423. '::std_case' => {
  424. 'client-date' => 'Client-Date',
  425. 'x-powered-by' => 'X-Powered-By',
  426. 'client-response-num' => 'Client-Response-Num',
  427. 'client-peer' => 'Client-Peer'
  428. },
  429. 'client-date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  430. 'content-type' => 'application/json; charset=utf-8',
  431. 'server' => 'Apache/2.4.7 (Ubuntu)'
  432. }, 'HTTP::Headers' );
  433. $VAR5 = '{"id":8,"title":"STROGGIFY POPULATION CENTERS","section_id":9,"type_id":6,"priority_id":4,"milestone_id":null,"refs":null,"created_by":1,"created_on":1419364929,"updated_by":1,"updated_on":1419364929,"estimate":null,"estimate_forecast":null,"suite_id":9,"custom_preconds":null,"custom_steps":null,"custom_expected":null}';
  434. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  435. }
  436. {
  437. $VAR1 = 'index.php?/api/v2/add_run/9';
  438. $VAR2 = '200';
  439. $VAR3 = 'OK';
  440. $VAR4 = bless( {
  441. 'connection' => 'close',
  442. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  443. 'client-response-num' => 1,
  444. 'date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  445. 'client-peer' => '192.168.122.217:80',
  446. 'content-length' => '654',
  447. '::std_case' => {
  448. 'client-date' => 'Client-Date',
  449. 'x-powered-by' => 'X-Powered-By',
  450. 'client-response-num' => 'Client-Response-Num',
  451. 'client-peer' => 'Client-Peer'
  452. },
  453. 'client-date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  454. 'content-type' => 'application/json; charset=utf-8',
  455. 'server' => 'Apache/2.4.7 (Ubuntu)'
  456. }, 'HTTP::Headers' );
  457. $VAR5 = '{"id":22,"suite_id":9,"name":"SEND T-1000 INFILTRATION UNITS BACK IN TIME","description":"ACQUIRE CLOTHES, BOOTS AND MOTORCYCLE","milestone_id":null,"assignedto_id":null,"include_all":true,"is_completed":false,"completed_on":null,"config":null,"config_ids":[],"passed_count":0,"blocked_count":0,"untested_count":1,"retest_count":0,"failed_count":0,"custom_status1_count":0,"custom_status2_count":0,"custom_status3_count":0,"custom_status4_count":0,"custom_status5_count":0,"custom_status6_count":0,"custom_status7_count":0,"project_id":9,"plan_id":null,"created_on":1419364929,"created_by":1,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/runs\\/view\\/22"}';
  458. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  459. }
  460. {
  461. $VAR1 = 'index.php?/api/v2/get_runs/9';
  462. $VAR2 = '200';
  463. $VAR3 = 'OK';
  464. $VAR4 = bless( {
  465. 'connection' => 'close',
  466. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  467. 'client-response-num' => 1,
  468. 'date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  469. 'client-peer' => '192.168.122.217:80',
  470. 'content-length' => '656',
  471. '::std_case' => {
  472. 'client-date' => 'Client-Date',
  473. 'x-powered-by' => 'X-Powered-By',
  474. 'client-response-num' => 'Client-Response-Num',
  475. 'client-peer' => 'Client-Peer'
  476. },
  477. 'client-date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  478. 'content-type' => 'application/json; charset=utf-8',
  479. 'server' => 'Apache/2.4.7 (Ubuntu)'
  480. }, 'HTTP::Headers' );
  481. $VAR5 = '[{"id":22,"suite_id":9,"name":"SEND T-1000 INFILTRATION UNITS BACK IN TIME","description":"ACQUIRE CLOTHES, BOOTS AND MOTORCYCLE","milestone_id":null,"assignedto_id":null,"include_all":true,"is_completed":false,"completed_on":null,"config":null,"config_ids":[],"passed_count":0,"blocked_count":0,"untested_count":1,"retest_count":0,"failed_count":0,"custom_status1_count":0,"custom_status2_count":0,"custom_status3_count":0,"custom_status4_count":0,"custom_status5_count":0,"custom_status6_count":0,"custom_status7_count":0,"project_id":9,"plan_id":null,"created_on":1419364929,"created_by":1,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/runs\\/view\\/22"}]';
  482. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  483. }
  484. {
  485. $VAR1 = 'index.php?/api/v2/get_runs/9';
  486. $VAR2 = '200';
  487. $VAR3 = 'OK';
  488. $VAR4 = bless( {
  489. 'connection' => 'close',
  490. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  491. 'client-response-num' => 1,
  492. 'date' => 'Tue, 23 Dec 2014 20:02:09 GMT',
  493. 'client-peer' => '192.168.122.217:80',
  494. 'content-length' => '656',
  495. '::std_case' => {
  496. 'client-date' => 'Client-Date',
  497. 'x-powered-by' => 'X-Powered-By',
  498. 'client-response-num' => 'Client-Response-Num',
  499. 'client-peer' => 'Client-Peer'
  500. },
  501. 'client-date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  502. 'content-type' => 'application/json; charset=utf-8',
  503. 'server' => 'Apache/2.4.7 (Ubuntu)'
  504. }, 'HTTP::Headers' );
  505. $VAR5 = '[{"id":22,"suite_id":9,"name":"SEND T-1000 INFILTRATION UNITS BACK IN TIME","description":"ACQUIRE CLOTHES, BOOTS AND MOTORCYCLE","milestone_id":null,"assignedto_id":null,"include_all":true,"is_completed":false,"completed_on":null,"config":null,"config_ids":[],"passed_count":0,"blocked_count":0,"untested_count":1,"retest_count":0,"failed_count":0,"custom_status1_count":0,"custom_status2_count":0,"custom_status3_count":0,"custom_status4_count":0,"custom_status5_count":0,"custom_status6_count":0,"custom_status7_count":0,"project_id":9,"plan_id":null,"created_on":1419364929,"created_by":1,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/runs\\/view\\/22"}]';
  506. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  507. }
  508. {
  509. $VAR1 = 'index.php?/api/v2/get_run/22';
  510. $VAR2 = '200';
  511. $VAR3 = 'OK';
  512. $VAR4 = bless( {
  513. 'connection' => 'close',
  514. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  515. 'client-response-num' => 1,
  516. 'date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  517. 'client-peer' => '192.168.122.217:80',
  518. 'content-length' => '654',
  519. '::std_case' => {
  520. 'client-date' => 'Client-Date',
  521. 'x-powered-by' => 'X-Powered-By',
  522. 'client-response-num' => 'Client-Response-Num',
  523. 'client-peer' => 'Client-Peer'
  524. },
  525. 'client-date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  526. 'content-type' => 'application/json; charset=utf-8',
  527. 'server' => 'Apache/2.4.7 (Ubuntu)'
  528. }, 'HTTP::Headers' );
  529. $VAR5 = '{"id":22,"suite_id":9,"name":"SEND T-1000 INFILTRATION UNITS BACK IN TIME","description":"ACQUIRE CLOTHES, BOOTS AND MOTORCYCLE","milestone_id":null,"assignedto_id":null,"include_all":true,"is_completed":false,"completed_on":null,"config":null,"config_ids":[],"passed_count":0,"blocked_count":0,"untested_count":1,"retest_count":0,"failed_count":0,"custom_status1_count":0,"custom_status2_count":0,"custom_status3_count":0,"custom_status4_count":0,"custom_status5_count":0,"custom_status6_count":0,"custom_status7_count":0,"project_id":9,"plan_id":null,"created_on":1419364929,"created_by":1,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/runs\\/view\\/22"}';
  530. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  531. }
  532. {
  533. $VAR1 = 'index.php?/api/v2/add_milestone/9';
  534. $VAR2 = '200';
  535. $VAR3 = 'OK';
  536. $VAR4 = bless( {
  537. 'connection' => 'close',
  538. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  539. 'client-response-num' => 1,
  540. 'date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  541. 'client-peer' => '192.168.122.217:80',
  542. 'content-length' => '244',
  543. '::std_case' => {
  544. 'client-date' => 'Client-Date',
  545. 'x-powered-by' => 'X-Powered-By',
  546. 'client-response-num' => 'Client-Response-Num',
  547. 'client-peer' => 'Client-Peer'
  548. },
  549. 'client-date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  550. 'content-type' => 'application/json; charset=utf-8',
  551. 'server' => 'Apache/2.4.7 (Ubuntu)'
  552. }, 'HTTP::Headers' );
  553. $VAR5 = '{"id":8,"name":"Humanity Exterminated","description":"Kill quota reached if not achieved in 5 years","due_on":1577152930,"is_completed":false,"completed_on":null,"project_id":9,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/milestones\\/view\\/8"}';
  554. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  555. }
  556. {
  557. $VAR1 = 'index.php?/api/v2/get_milestones/9';
  558. $VAR2 = '200';
  559. $VAR3 = 'OK';
  560. $VAR4 = bless( {
  561. 'connection' => 'close',
  562. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  563. 'client-response-num' => 1,
  564. 'date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  565. 'client-peer' => '192.168.122.217:80',
  566. 'content-length' => '246',
  567. '::std_case' => {
  568. 'client-date' => 'Client-Date',
  569. 'x-powered-by' => 'X-Powered-By',
  570. 'client-response-num' => 'Client-Response-Num',
  571. 'client-peer' => 'Client-Peer'
  572. },
  573. 'client-date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  574. 'content-type' => 'application/json; charset=utf-8',
  575. 'server' => 'Apache/2.4.7 (Ubuntu)'
  576. }, 'HTTP::Headers' );
  577. $VAR5 = '[{"id":8,"name":"Humanity Exterminated","description":"Kill quota reached if not achieved in 5 years","due_on":1577152930,"is_completed":false,"completed_on":null,"project_id":9,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/milestones\\/view\\/8"}]';
  578. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  579. }
  580. {
  581. $VAR1 = 'index.php?/api/v2/get_milestones/9';
  582. $VAR2 = '200';
  583. $VAR3 = 'OK';
  584. $VAR4 = bless( {
  585. 'connection' => 'close',
  586. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  587. 'client-response-num' => 1,
  588. 'date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  589. 'client-peer' => '192.168.122.217:80',
  590. 'content-length' => '246',
  591. '::std_case' => {
  592. 'client-date' => 'Client-Date',
  593. 'x-powered-by' => 'X-Powered-By',
  594. 'client-response-num' => 'Client-Response-Num',
  595. 'client-peer' => 'Client-Peer'
  596. },
  597. 'client-date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  598. 'content-type' => 'application/json; charset=utf-8',
  599. 'server' => 'Apache/2.4.7 (Ubuntu)'
  600. }, 'HTTP::Headers' );
  601. $VAR5 = '[{"id":8,"name":"Humanity Exterminated","description":"Kill quota reached if not achieved in 5 years","due_on":1577152930,"is_completed":false,"completed_on":null,"project_id":9,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/milestones\\/view\\/8"}]';
  602. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  603. }
  604. {
  605. $VAR1 = 'index.php?/api/v2/get_milestone/8';
  606. $VAR2 = '200';
  607. $VAR3 = 'OK';
  608. $VAR4 = bless( {
  609. 'connection' => 'close',
  610. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  611. 'client-response-num' => 1,
  612. 'date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  613. 'client-peer' => '192.168.122.217:80',
  614. 'content-length' => '244',
  615. '::std_case' => {
  616. 'client-date' => 'Client-Date',
  617. 'x-powered-by' => 'X-Powered-By',
  618. 'client-response-num' => 'Client-Response-Num',
  619. 'client-peer' => 'Client-Peer'
  620. },
  621. 'client-date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  622. 'content-type' => 'application/json; charset=utf-8',
  623. 'server' => 'Apache/2.4.7 (Ubuntu)'
  624. }, 'HTTP::Headers' );
  625. $VAR5 = '{"id":8,"name":"Humanity Exterminated","description":"Kill quota reached if not achieved in 5 years","due_on":1577152930,"is_completed":false,"completed_on":null,"project_id":9,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/milestones\\/view\\/8"}';
  626. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  627. }
  628. {
  629. $VAR1 = 'index.php?/api/v2/add_plan/9';
  630. $VAR2 = '200';
  631. $VAR3 = 'OK';
  632. $VAR4 = bless( {
  633. 'connection' => 'close',
  634. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  635. 'client-response-num' => 1,
  636. 'date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  637. 'client-peer' => '192.168.122.217:80',
  638. 'content-length' => '1289',
  639. '::std_case' => {
  640. 'client-date' => 'Client-Date',
  641. 'x-powered-by' => 'X-Powered-By',
  642. 'client-response-num' => 'Client-Response-Num',
  643. 'client-peer' => 'Client-Peer'
  644. },
  645. 'client-date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  646. 'content-type' => 'application/json; charset=utf-8',
  647. 'server' => 'Apache/2.4.7 (Ubuntu)'
  648. }, 'HTTP::Headers' );
  649. $VAR5 = '{"id":23,"name":"GosPlan","description":"Soviet 5-year agriculture plan to liquidate Kulaks","milestone_id":8,"assignedto_id":null,"is_completed":false,"completed_on":null,"passed_count":0,"blocked_count":0,"untested_count":1,"retest_count":0,"failed_count":0,"custom_status1_count":0,"custom_status2_count":0,"custom_status3_count":0,"custom_status4_count":0,"custom_status5_count":0,"custom_status6_count":0,"custom_status7_count":0,"project_id":9,"created_on":1419364930,"created_by":1,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/plans\\/view\\/23","entries":[{"id":"271443a5-aacf-467e-8993-b4f7001195cf","suite_id":9,"name":"Executing the great plan","runs":[{"id":24,"suite_id":9,"name":"Executing the great plan","description":null,"milestone_id":8,"assignedto_id":null,"include_all":true,"is_completed":false,"completed_on":null,"passed_count":0,"blocked_count":0,"untested_count":1,"retest_count":0,"failed_count":0,"custom_status1_count":0,"custom_status2_count":0,"custom_status3_count":0,"custom_status4_count":0,"custom_status5_count":0,"custom_status6_count":0,"custom_status7_count":0,"project_id":9,"plan_id":23,"entry_index":1,"entry_id":"271443a5-aacf-467e-8993-b4f7001195cf","config":null,"config_ids":[],"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/runs\\/view\\/24"}]}]}';
  650. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  651. }
  652. {
  653. $VAR1 = 'index.php?/api/v2/get_plans/9';
  654. $VAR2 = '200';
  655. $VAR3 = 'OK';
  656. $VAR4 = bless( {
  657. 'connection' => 'close',
  658. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  659. 'client-response-num' => 1,
  660. 'date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  661. 'client-peer' => '192.168.122.217:80',
  662. 'content-length' => '554',
  663. '::std_case' => {
  664. 'client-date' => 'Client-Date',
  665. 'x-powered-by' => 'X-Powered-By',
  666. 'client-response-num' => 'Client-Response-Num',
  667. 'client-peer' => 'Client-Peer'
  668. },
  669. 'client-date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  670. 'content-type' => 'application/json; charset=utf-8',
  671. 'server' => 'Apache/2.4.7 (Ubuntu)'
  672. }, 'HTTP::Headers' );
  673. $VAR5 = '[{"id":23,"name":"GosPlan","description":"Soviet 5-year agriculture plan to liquidate Kulaks","milestone_id":8,"assignedto_id":null,"is_completed":false,"completed_on":null,"passed_count":0,"blocked_count":0,"untested_count":1,"retest_count":0,"failed_count":0,"custom_status1_count":0,"custom_status2_count":0,"custom_status3_count":0,"custom_status4_count":0,"custom_status5_count":0,"custom_status6_count":0,"custom_status7_count":0,"project_id":9,"created_on":1419364930,"created_by":1,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/plans\\/view\\/23"}]';
  674. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  675. }
  676. {
  677. $VAR1 = 'index.php?/api/v2/get_plans/9';
  678. $VAR2 = '200';
  679. $VAR3 = 'OK';
  680. $VAR4 = bless( {
  681. 'connection' => 'close',
  682. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  683. 'client-response-num' => 1,
  684. 'date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  685. 'client-peer' => '192.168.122.217:80',
  686. 'content-length' => '554',
  687. '::std_case' => {
  688. 'client-date' => 'Client-Date',
  689. 'x-powered-by' => 'X-Powered-By',
  690. 'client-response-num' => 'Client-Response-Num',
  691. 'client-peer' => 'Client-Peer'
  692. },
  693. 'client-date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  694. 'content-type' => 'application/json; charset=utf-8',
  695. 'server' => 'Apache/2.4.7 (Ubuntu)'
  696. }, 'HTTP::Headers' );
  697. $VAR5 = '[{"id":23,"name":"GosPlan","description":"Soviet 5-year agriculture plan to liquidate Kulaks","milestone_id":8,"assignedto_id":null,"is_completed":false,"completed_on":null,"passed_count":0,"blocked_count":0,"untested_count":1,"retest_count":0,"failed_count":0,"custom_status1_count":0,"custom_status2_count":0,"custom_status3_count":0,"custom_status4_count":0,"custom_status5_count":0,"custom_status6_count":0,"custom_status7_count":0,"project_id":9,"created_on":1419364930,"created_by":1,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/plans\\/view\\/23"}]';
  698. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  699. }
  700. {
  701. $VAR1 = 'index.php?/api/v2/get_plan/23';
  702. $VAR2 = '200';
  703. $VAR3 = 'OK';
  704. $VAR4 = bless( {
  705. 'connection' => 'close',
  706. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  707. 'client-response-num' => 1,
  708. 'date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  709. 'client-peer' => '192.168.122.217:80',
  710. 'content-length' => '1289',
  711. '::std_case' => {
  712. 'client-date' => 'Client-Date',
  713. 'x-powered-by' => 'X-Powered-By',
  714. 'client-response-num' => 'Client-Response-Num',
  715. 'client-peer' => 'Client-Peer'
  716. },
  717. 'client-date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  718. 'content-type' => 'application/json; charset=utf-8',
  719. 'server' => 'Apache/2.4.7 (Ubuntu)'
  720. }, 'HTTP::Headers' );
  721. $VAR5 = '{"id":23,"name":"GosPlan","description":"Soviet 5-year agriculture plan to liquidate Kulaks","milestone_id":8,"assignedto_id":null,"is_completed":false,"completed_on":null,"passed_count":0,"blocked_count":0,"untested_count":1,"retest_count":0,"failed_count":0,"custom_status1_count":0,"custom_status2_count":0,"custom_status3_count":0,"custom_status4_count":0,"custom_status5_count":0,"custom_status6_count":0,"custom_status7_count":0,"project_id":9,"created_on":1419364930,"created_by":1,"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/plans\\/view\\/23","entries":[{"id":"271443a5-aacf-467e-8993-b4f7001195cf","suite_id":9,"name":"Executing the great plan","runs":[{"id":24,"suite_id":9,"name":"Executing the great plan","description":null,"milestone_id":8,"assignedto_id":null,"include_all":true,"is_completed":false,"completed_on":null,"passed_count":0,"blocked_count":0,"untested_count":1,"retest_count":0,"failed_count":0,"custom_status1_count":0,"custom_status2_count":0,"custom_status3_count":0,"custom_status4_count":0,"custom_status5_count":0,"custom_status6_count":0,"custom_status7_count":0,"project_id":9,"plan_id":23,"entry_index":1,"entry_id":"271443a5-aacf-467e-8993-b4f7001195cf","config":null,"config_ids":[],"url":"http:\\/\\/testrail.local\\/\\/index.php?\\/runs\\/view\\/24"}]}]}';
  722. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  723. }
  724. {
  725. $VAR1 = 'index.php?/api/v2/get_tests/22';
  726. $VAR2 = '200';
  727. $VAR3 = 'OK';
  728. $VAR4 = bless( {
  729. 'connection' => 'close',
  730. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  731. 'client-response-num' => 1,
  732. 'date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  733. 'client-peer' => '192.168.122.217:80',
  734. 'content-length' => '276',
  735. '::std_case' => {
  736. 'client-date' => 'Client-Date',
  737. 'x-powered-by' => 'X-Powered-By',
  738. 'client-response-num' => 'Client-Response-Num',
  739. 'client-peer' => 'Client-Peer'
  740. },
  741. 'client-date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  742. 'content-type' => 'application/json; charset=utf-8',
  743. 'server' => 'Apache/2.4.7 (Ubuntu)'
  744. }, 'HTTP::Headers' );
  745. $VAR5 = '[{"id":15,"case_id":8,"status_id":3,"assignedto_id":null,"run_id":22,"title":"STROGGIFY POPULATION CENTERS","type_id":6,"priority_id":4,"estimate":null,"estimate_forecast":null,"refs":null,"milestone_id":null,"custom_preconds":null,"custom_steps":null,"custom_expected":null}]';
  746. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  747. }
  748. {
  749. $VAR1 = 'index.php?/api/v2/get_tests/22';
  750. $VAR2 = '200';
  751. $VAR3 = 'OK';
  752. $VAR4 = bless( {
  753. 'connection' => 'close',
  754. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  755. 'client-response-num' => 1,
  756. 'date' => 'Tue, 23 Dec 2014 20:02:10 GMT',
  757. 'client-peer' => '192.168.122.217:80',
  758. 'content-length' => '276',
  759. '::std_case' => {
  760. 'client-date' => 'Client-Date',
  761. 'x-powered-by' => 'X-Powered-By',
  762. 'client-response-num' => 'Client-Response-Num',
  763. 'client-peer' => 'Client-Peer'
  764. },
  765. 'client-date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  766. 'content-type' => 'application/json; charset=utf-8',
  767. 'server' => 'Apache/2.4.7 (Ubuntu)'
  768. }, 'HTTP::Headers' );
  769. $VAR5 = '[{"id":15,"case_id":8,"status_id":3,"assignedto_id":null,"run_id":22,"title":"STROGGIFY POPULATION CENTERS","type_id":6,"priority_id":4,"estimate":null,"estimate_forecast":null,"refs":null,"milestone_id":null,"custom_preconds":null,"custom_steps":null,"custom_expected":null}]';
  770. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  771. }
  772. {
  773. $VAR1 = 'index.php?/api/v2/get_test/15';
  774. $VAR2 = '200';
  775. $VAR3 = 'OK';
  776. $VAR4 = bless( {
  777. 'connection' => 'close',
  778. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  779. 'client-response-num' => 1,
  780. 'date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  781. 'client-peer' => '192.168.122.217:80',
  782. 'content-length' => '274',
  783. '::std_case' => {
  784. 'client-date' => 'Client-Date',
  785. 'x-powered-by' => 'X-Powered-By',
  786. 'client-response-num' => 'Client-Response-Num',
  787. 'client-peer' => 'Client-Peer'
  788. },
  789. 'client-date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  790. 'content-type' => 'application/json; charset=utf-8',
  791. 'server' => 'Apache/2.4.7 (Ubuntu)'
  792. }, 'HTTP::Headers' );
  793. $VAR5 = '{"id":15,"case_id":8,"status_id":3,"assignedto_id":null,"run_id":22,"title":"STROGGIFY POPULATION CENTERS","type_id":6,"priority_id":4,"estimate":null,"estimate_forecast":null,"refs":null,"milestone_id":null,"custom_preconds":null,"custom_steps":null,"custom_expected":null}';
  794. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  795. }
  796. {
  797. $VAR1 = 'index.php?/api/v2/get_result_fields';
  798. $VAR2 = '200';
  799. $VAR3 = 'OK';
  800. $VAR4 = bless( {
  801. 'connection' => 'close',
  802. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  803. 'client-response-num' => 1,
  804. 'date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  805. 'client-peer' => '192.168.122.217:80',
  806. 'content-length' => '2',
  807. '::std_case' => {
  808. 'client-date' => 'Client-Date',
  809. 'x-powered-by' => 'X-Powered-By',
  810. 'client-response-num' => 'Client-Response-Num',
  811. 'client-peer' => 'Client-Peer'
  812. },
  813. 'client-date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  814. 'content-type' => 'application/json; charset=utf-8',
  815. 'server' => 'Apache/2.4.7 (Ubuntu)'
  816. }, 'HTTP::Headers' );
  817. $VAR5 = '[]';
  818. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  819. }
  820. {
  821. $VAR1 = 'index.php?/api/v2/get_statuses';
  822. $VAR2 = '200';
  823. $VAR3 = 'OK';
  824. $VAR4 = bless( {
  825. 'connection' => 'close',
  826. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  827. 'client-response-num' => 1,
  828. 'date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  829. 'client-peer' => '192.168.122.217:80',
  830. 'content-length' => '830',
  831. '::std_case' => {
  832. 'client-date' => 'Client-Date',
  833. 'x-powered-by' => 'X-Powered-By',
  834. 'client-response-num' => 'Client-Response-Num',
  835. 'client-peer' => 'Client-Peer'
  836. },
  837. 'client-date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  838. 'content-type' => 'application/json; charset=utf-8',
  839. 'server' => 'Apache/2.4.7 (Ubuntu)'
  840. }, 'HTTP::Headers' );
  841. $VAR5 = '[{"id":1,"name":"passed","label":"Passed","color_dark":6667107,"color_medium":9820525,"color_bright":12709313,"is_system":true,"is_untested":false,"is_final":true},{"id":2,"name":"blocked","label":"Blocked","color_dark":9474192,"color_medium":13684944,"color_bright":14737632,"is_system":true,"is_untested":false,"is_final":true},{"id":3,"name":"untested","label":"Untested","color_dark":11579568,"color_medium":15395562,"color_bright":15790320,"is_system":true,"is_untested":true,"is_final":false},{"id":4,"name":"retest","label":"Retest","color_dark":13026868,"color_medium":15593088,"color_bright":16448182,"is_system":true,"is_untested":false,"is_final":false},{"id":5,"name":"failed","label":"Failed","color_dark":14250867,"color_medium":15829135,"color_bright":16631751,"is_system":true,"is_untested":false,"is_final":true}]';
  842. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  843. }
  844. {
  845. $VAR1 = 'index.php?/api/v2/add_result/15';
  846. $VAR2 = '200';
  847. $VAR3 = 'OK';
  848. $VAR4 = bless( {
  849. 'connection' => 'close',
  850. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  851. 'client-response-num' => 1,
  852. 'date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  853. 'client-peer' => '192.168.122.217:80',
  854. 'content-length' => '174',
  855. '::std_case' => {
  856. 'client-date' => 'Client-Date',
  857. 'x-powered-by' => 'X-Powered-By',
  858. 'client-response-num' => 'Client-Response-Num',
  859. 'client-peer' => 'Client-Peer'
  860. },
  861. 'client-date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  862. 'content-type' => 'application/json; charset=utf-8',
  863. 'server' => 'Apache/2.4.7 (Ubuntu)'
  864. }, 'HTTP::Headers' );
  865. $VAR5 = '{"id":8,"test_id":15,"status_id":1,"created_by":1,"created_on":1419364931,"assignedto_id":null,"comment":"REAPER FORCES INBOUND","version":null,"elapsed":null,"defects":null}';
  866. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  867. }
  868. {
  869. $VAR1 = 'index.php?/api/v2/get_results/15';
  870. $VAR2 = '200';
  871. $VAR3 = 'OK';
  872. $VAR4 = bless( {
  873. 'connection' => 'close',
  874. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  875. 'client-response-num' => 1,
  876. 'date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  877. 'client-peer' => '192.168.122.217:80',
  878. 'content-length' => '176',
  879. '::std_case' => {
  880. 'client-date' => 'Client-Date',
  881. 'x-powered-by' => 'X-Powered-By',
  882. 'client-response-num' => 'Client-Response-Num',
  883. 'client-peer' => 'Client-Peer'
  884. },
  885. 'client-date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  886. 'content-type' => 'application/json; charset=utf-8',
  887. 'server' => 'Apache/2.4.7 (Ubuntu)'
  888. }, 'HTTP::Headers' );
  889. $VAR5 = '[{"id":8,"test_id":15,"status_id":1,"created_by":1,"created_on":1419364931,"assignedto_id":null,"comment":"REAPER FORCES INBOUND","version":null,"elapsed":null,"defects":null}]';
  890. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  891. }
  892. {
  893. $VAR1 = 'index.php?/api/v2/delete_plan/23';
  894. $VAR2 = '200';
  895. $VAR3 = 'OK';
  896. $VAR4 = bless( {
  897. 'connection' => 'close',
  898. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  899. 'client-response-num' => 1,
  900. 'date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  901. 'client-peer' => '192.168.122.217:80',
  902. 'content-length' => '0',
  903. '::std_case' => {
  904. 'client-date' => 'Client-Date',
  905. 'x-powered-by' => 'X-Powered-By',
  906. 'client-response-num' => 'Client-Response-Num',
  907. 'client-peer' => 'Client-Peer'
  908. },
  909. 'client-date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  910. 'content-type' => 'application/json; charset=utf-8',
  911. 'server' => 'Apache/2.4.7 (Ubuntu)'
  912. }, 'HTTP::Headers' );
  913. $VAR5 = '';
  914. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  915. }
  916. {
  917. $VAR1 = 'index.php?/api/v2/delete_milestone/8';
  918. $VAR2 = '200';
  919. $VAR3 = 'OK';
  920. $VAR4 = bless( {
  921. 'connection' => 'close',
  922. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  923. 'client-response-num' => 1,
  924. 'date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  925. 'client-peer' => '192.168.122.217:80',
  926. 'content-length' => '0',
  927. '::std_case' => {
  928. 'client-date' => 'Client-Date',
  929. 'x-powered-by' => 'X-Powered-By',
  930. 'client-response-num' => 'Client-Response-Num',
  931. 'client-peer' => 'Client-Peer'
  932. },
  933. 'client-date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  934. 'content-type' => 'application/json; charset=utf-8',
  935. 'server' => 'Apache/2.4.7 (Ubuntu)'
  936. }, 'HTTP::Headers' );
  937. $VAR5 = '';
  938. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  939. }
  940. {
  941. $VAR1 = 'index.php?/api/v2/delete_run/22';
  942. $VAR2 = '200';
  943. $VAR3 = 'OK';
  944. $VAR4 = bless( {
  945. 'connection' => 'close',
  946. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  947. 'client-response-num' => 1,
  948. 'date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  949. 'client-peer' => '192.168.122.217:80',
  950. 'content-length' => '0',
  951. '::std_case' => {
  952. 'client-date' => 'Client-Date',
  953. 'x-powered-by' => 'X-Powered-By',
  954. 'client-response-num' => 'Client-Response-Num',
  955. 'client-peer' => 'Client-Peer'
  956. },
  957. 'client-date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  958. 'content-type' => 'application/json; charset=utf-8',
  959. 'server' => 'Apache/2.4.7 (Ubuntu)'
  960. }, 'HTTP::Headers' );
  961. $VAR5 = '';
  962. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  963. }
  964. {
  965. $VAR1 = 'index.php?/api/v2/delete_case/8';
  966. $VAR2 = '200';
  967. $VAR3 = 'OK';
  968. $VAR4 = bless( {
  969. 'connection' => 'close',
  970. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  971. 'client-response-num' => 1,
  972. 'date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  973. 'client-peer' => '192.168.122.217:80',
  974. 'content-length' => '0',
  975. '::std_case' => {
  976. 'client-date' => 'Client-Date',
  977. 'x-powered-by' => 'X-Powered-By',
  978. 'client-response-num' => 'Client-Response-Num',
  979. 'client-peer' => 'Client-Peer'
  980. },
  981. 'client-date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  982. 'content-type' => 'application/json; charset=utf-8',
  983. 'server' => 'Apache/2.4.7 (Ubuntu)'
  984. }, 'HTTP::Headers' );
  985. $VAR5 = '';
  986. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  987. }
  988. {
  989. $VAR1 = 'index.php?/api/v2/delete_section/9';
  990. $VAR2 = '200';
  991. $VAR3 = 'OK';
  992. $VAR4 = bless( {
  993. 'connection' => 'close',
  994. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  995. 'client-response-num' => 1,
  996. 'date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  997. 'client-peer' => '192.168.122.217:80',
  998. 'content-length' => '0',
  999. '::std_case' => {
  1000. 'client-date' => 'Client-Date',
  1001. 'x-powered-by' => 'X-Powered-By',
  1002. 'client-response-num' => 'Client-Response-Num',
  1003. 'client-peer' => 'Client-Peer'
  1004. },
  1005. 'client-date' => 'Tue, 23 Dec 2014 20:02:11 GMT',
  1006. 'content-type' => 'application/json; charset=utf-8',
  1007. 'server' => 'Apache/2.4.7 (Ubuntu)'
  1008. }, 'HTTP::Headers' );
  1009. $VAR5 = '';
  1010. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  1011. }
  1012. {
  1013. $VAR1 = 'index.php?/api/v2/delete_suite/9';
  1014. $VAR2 = '200';
  1015. $VAR3 = 'OK';
  1016. $VAR4 = bless( {
  1017. 'connection' => 'close',
  1018. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  1019. 'client-response-num' => 1,
  1020. 'date' => 'Tue, 23 Dec 2014 20:02:12 GMT',
  1021. 'client-peer' => '192.168.122.217:80',
  1022. 'content-length' => '0',
  1023. '::std_case' => {
  1024. 'client-date' => 'Client-Date',
  1025. 'x-powered-by' => 'X-Powered-By',
  1026. 'client-response-num' => 'Client-Response-Num',
  1027. 'client-peer' => 'Client-Peer'
  1028. },
  1029. 'client-date' => 'Tue, 23 Dec 2014 20:02:12 GMT',
  1030. 'content-type' => 'application/json; charset=utf-8',
  1031. 'server' => 'Apache/2.4.7 (Ubuntu)'
  1032. }, 'HTTP::Headers' );
  1033. $VAR5 = '';
  1034. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  1035. }
  1036. {
  1037. $VAR1 = 'index.php?/api/v2/delete_project/9';
  1038. $VAR2 = '200';
  1039. $VAR3 = 'OK';
  1040. $VAR4 = bless( {
  1041. 'connection' => 'close',
  1042. 'x-powered-by' => 'PHP/5.5.9-1ubuntu4.5',
  1043. 'client-response-num' => 1,
  1044. 'date' => 'Tue, 23 Dec 2014 20:02:12 GMT',
  1045. 'client-peer' => '192.168.122.217:80',
  1046. 'content-length' => '0',
  1047. '::std_case' => {
  1048. 'client-date' => 'Client-Date',
  1049. 'x-powered-by' => 'X-Powered-By',
  1050. 'client-response-num' => 'Client-Response-Num',
  1051. 'client-peer' => 'Client-Peer'
  1052. },
  1053. 'client-date' => 'Tue, 23 Dec 2014 20:02:12 GMT',
  1054. 'content-type' => 'application/json; charset=utf-8',
  1055. 'server' => 'Apache/2.4.7 (Ubuntu)'
  1056. }, 'HTTP::Headers' );
  1057. $VAR5 = '';
  1058. $mockObject->map_response(qr/\Q$VAR1\E/,HTTP::Response->new($VAR2, $VAR3, $VAR4, $VAR5));
  1059. }
  1060. 1;