HttpRequestTestData.php 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <?php
  2. namespace Tests\Data;
  3. class HttpRequestTestData
  4. {
  5. const TAG_NAME = 'v3.4.1';
  6. const NEW_TAG_NAME = 'v3.4.2';
  7. const SVG_LOGO_BODY = '<svg xmlns="http://www.w3.org/2000/svg" class="r-k200y r-13gxpu9 r-4qtqp9 r-yyyyoo r-np7d94 r-dnmrzs r-bnwqim r-1plcrui r-lrvibr" width="22.706" height="22.706"><path d="M22.706 4.311c-.835.37-1.732.62-2.675.733a4.67 4.67 0 002.048-2.578 9.3 9.3 0 01-2.958 1.13 4.66 4.66 0 00-7.938 4.25 13.229 13.229 0 01-9.602-4.868c-.4.69-.63 1.49-.63 2.342a4.66 4.66 0 002.072 3.878 4.647 4.647 0 01-2.11-.583v.06a4.66 4.66 0 003.737 4.568 4.692 4.692 0 01-2.104.08 4.661 4.661 0 004.352 3.234 9.348 9.348 0 01-5.786 1.995A9.5 9.5 0 010 18.487a13.175 13.175 0 007.14 2.093c8.57 0 13.255-7.098 13.255-13.254 0-.2-.005-.402-.014-.602a9.47 9.47 0 002.323-2.41z" fill="#1da1f2"/></svg>';
  8. const TFA_JSON_BODY = '
  9. [
  10. [
  11. "Twitch",
  12. {
  13. "domain": "twitch.tv",
  14. "url": "https://www.twitch.tv/",
  15. "tfa":
  16. [
  17. "sms",
  18. "custom-software",
  19. "totp"
  20. ],
  21. "custom-software":
  22. [
  23. "Authy"
  24. ],
  25. "documentation": "https://help.twitch.tv/s/article/two-factor-authentication",
  26. "notes": "To activate two factor authentication, you must provide a mobile phone number.",
  27. "keywords":
  28. [
  29. "entertainment"
  30. ]
  31. }
  32. ],
  33. [
  34. "Twitter",
  35. {
  36. "domain": "twitter.com",
  37. "tfa":
  38. [
  39. "sms",
  40. "totp",
  41. "u2f"
  42. ],
  43. "documentation": "https://help.twitter.com/en/managing-your-account/two-factor-authentication",
  44. "recovery": "https://help.twitter.com/en/managing-your-account/issues-with-login-authentication",
  45. "notes": "SMS only available on select providers.",
  46. "keywords":
  47. [
  48. "social"
  49. ]
  50. }
  51. ],
  52. [
  53. "Txbit",
  54. {
  55. "domain": "txbit.io",
  56. "tfa":
  57. [
  58. "totp"
  59. ],
  60. "documentation": "https://support.txbit.io/support/solutions/articles/44000447137",
  61. "keywords":
  62. [
  63. "cryptocurrencies"
  64. ]
  65. }
  66. ]
  67. ]';
  68. const LATEST_RELEASE_BODY_NO_NEW_RELEASE = '
  69. {
  70. "url": "https://api.github.com/repos/Bubka/2FAuth/releases/84186611",
  71. "assets_url": "https://api.github.com/repos/Bubka/2FAuth/releases/84186611/assets",
  72. "upload_url": "https://uploads.github.com/repos/Bubka/2FAuth/releases/84186611/assets{?name,label}",
  73. "html_url": "https://github.com/Bubka/2FAuth/releases/tag/' . self::TAG_NAME . '",
  74. "id": 84186611,
  75. "author": {
  76. "login": "Bubka",
  77. "id": 858858,
  78. "node_id": "MDQ6VXNlcjg1ODg1OA==",
  79. "avatar_url": "https://avatars.githubusercontent.com/u/858858?v=4",
  80. "gravatar_id": "",
  81. "url": "https://api.github.com/users/Bubka",
  82. "html_url": "https://github.com/Bubka",
  83. "followers_url": "https://api.github.com/users/Bubka/followers",
  84. "following_url": "https://api.github.com/users/Bubka/following{/other_user}",
  85. "gists_url": "https://api.github.com/users/Bubka/gists{/gist_id}",
  86. "starred_url": "https://api.github.com/users/Bubka/starred{/owner}{/repo}",
  87. "subscriptions_url": "https://api.github.com/users/Bubka/subscriptions",
  88. "organizations_url": "https://api.github.com/users/Bubka/orgs",
  89. "repos_url": "https://api.github.com/users/Bubka/repos",
  90. "events_url": "https://api.github.com/users/Bubka/events{/privacy}",
  91. "received_events_url": "https://api.github.com/users/Bubka/received_events",
  92. "type": "User",
  93. "site_admin": false
  94. },
  95. "node_id": "RE_kwDOCyNVx84FBJXz",
  96. "tag_name": "' . self::TAG_NAME . '",
  97. "target_commitish": "master",
  98. "name": "' . self::TAG_NAME . '",
  99. "draft": false,
  100. "prerelease": false,
  101. "created_at": "2022-11-25T13:31:45Z",
  102. "published_at": "2022-11-25T13:44:10Z",
  103. "assets": [
  104. ],
  105. "tarball_url": "https://api.github.com/repos/Bubka/2FAuth/tarball/' . self::TAG_NAME . '",
  106. "zipball_url": "https://api.github.com/repos/Bubka/2FAuth/zipball/' . self::TAG_NAME . '",
  107. "body": "### Fixed\r\n\r\n- [issue #140](https://github.com/Bubka/2FAuth/issues/140) Bad regex for Period field (advanced form)\r\n- [issue #141](https://github.com/Bubka/2FAuth/issues/141) Digits field is missing in advanced form"
  108. }';
  109. const LATEST_RELEASE_BODY_NEW_RELEASE = '
  110. {
  111. "url": "https://api.github.com/repos/Bubka/2FAuth/releases/84186611",
  112. "assets_url": "https://api.github.com/repos/Bubka/2FAuth/releases/84186611/assets",
  113. "upload_url": "https://uploads.github.com/repos/Bubka/2FAuth/releases/84186611/assets{?name,label}",
  114. "html_url": "https://github.com/Bubka/2FAuth/releases/tag/' . self::NEW_TAG_NAME . '",
  115. "id": 84186611,
  116. "author": {
  117. "login": "Bubka",
  118. "id": 858858,
  119. "node_id": "MDQ6VXNlcjg1ODg1OA==",
  120. "avatar_url": "https://avatars.githubusercontent.com/u/858858?v=4",
  121. "gravatar_id": "",
  122. "url": "https://api.github.com/users/Bubka",
  123. "html_url": "https://github.com/Bubka",
  124. "followers_url": "https://api.github.com/users/Bubka/followers",
  125. "following_url": "https://api.github.com/users/Bubka/following{/other_user}",
  126. "gists_url": "https://api.github.com/users/Bubka/gists{/gist_id}",
  127. "starred_url": "https://api.github.com/users/Bubka/starred{/owner}{/repo}",
  128. "subscriptions_url": "https://api.github.com/users/Bubka/subscriptions",
  129. "organizations_url": "https://api.github.com/users/Bubka/orgs",
  130. "repos_url": "https://api.github.com/users/Bubka/repos",
  131. "events_url": "https://api.github.com/users/Bubka/events{/privacy}",
  132. "received_events_url": "https://api.github.com/users/Bubka/received_events",
  133. "type": "User",
  134. "site_admin": false
  135. },
  136. "node_id": "RE_kwDOCyNVx84FBJXz",
  137. "tag_name": "' . self::NEW_TAG_NAME . '",
  138. "target_commitish": "master",
  139. "name": "' . self::NEW_TAG_NAME . '",
  140. "draft": false,
  141. "prerelease": false,
  142. "created_at": "2022-12-25T13:31:45Z",
  143. "published_at": "2022-12-25T13:44:10Z",
  144. "assets": [
  145. ],
  146. "tarball_url": "https://api.github.com/repos/Bubka/2FAuth/tarball/' . self::NEW_TAG_NAME . '",
  147. "zipball_url": "https://api.github.com/repos/Bubka/2FAuth/zipball/' . self::NEW_TAG_NAME . '",
  148. "body": "### Fixed\r\n\r\n- [issue #140](https://github.com/Bubka/2FAuth/issues/140) Bad regex for Period field (advanced form)\r\n- [issue #141](https://github.com/Bubka/2FAuth/issues/141) Digits field is missing in advanced form"
  149. }';
  150. const ICON_PNG = 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAsUlEQVR4AWN44aVBEhoCGl4GGLzND/nYW/Fpdsf7urTX8Q74NLwtjf7z+vl/VPDzwvFX4eYIDUhm6//99AGi6PfDOz9OH4Tr+TSrHYuG1/GOn+f3AtGnOV0vvLXeZPr8+/IJouHbthU4nJQfAtQANBuuFJ+GDx2F///9g6gAMn5dOfP34zt8Gr7tWQ838n1DBlDk973r+DS8Sff+snQKBL2KsQOKfJzSAOFC9EPQcEhLAD5LqIU3S31+AAAAAElFTkSuQmCC';
  151. }