chillerlan-QRCodeTest-Data-ECITest.html 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/template.js"></script>
  22. <script src="js/search.js"></script>
  23. <script defer src="js/searchIndex.js"></script>
  24. </head>
  25. <body id="top">
  26. <header class="phpdocumentor-header phpdocumentor-section">
  27. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  28. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  29. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  30. <i class="fas fa-bars"></i>
  31. </label>
  32. <section data-search-form class="phpdocumentor-search">
  33. <label>
  34. <span class="visually-hidden">Search for</span>
  35. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  36. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  37. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  38. </svg>
  39. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  40. </label>
  41. </section>
  42. <nav class="phpdocumentor-topnav">
  43. <ul class="phpdocumentor-topnav__menu">
  44. <li class="phpdocumentor-topnav__menu-item -menu">
  45. <a href="https://php-qrcode.readthedocs.io">
  46. <span>
  47. User Manual
  48. </span>
  49. </a>
  50. </li>
  51. <li class="phpdocumentor-topnav__menu-item -social">
  52. <a href="https://github.com/chillerlan/php-qrcode">
  53. <span>
  54. <i class="fab fa-github"></i>
  55. </span>
  56. </a>
  57. </li>
  58. </ul>
  59. </nav>
  60. </header>
  61. <main class="phpdocumentor">
  62. <div class="phpdocumentor-section">
  63. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  64. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  65. Menu
  66. </label>
  67. <aside class="phpdocumentor-column -three phpdocumentor-sidebar">
  68. <section class="phpdocumentor-sidebar__category">
  69. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  70. <h4 class="phpdocumentor-sidebar__root-namespace">
  71. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  72. </h4>
  73. <ul class="phpdocumentor-list">
  74. <li>
  75. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  76. </li>
  77. <li>
  78. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  79. </li>
  80. </ul>
  81. <h4 class="phpdocumentor-sidebar__root-namespace">
  82. <a href="namespaces/output.html" class="">Output</a>
  83. </h4>
  84. </section>
  85. <section class="phpdocumentor-sidebar__category">
  86. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  87. <h4 class="phpdocumentor-sidebar__root-namespace">
  88. <a href="packages/Application.html" class="">Application</a>
  89. </h4>
  90. </section>
  91. <section class="phpdocumentor-sidebar__category">
  92. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  93. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  94. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  95. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  96. </section>
  97. <section class="phpdocumentor-sidebar__category">
  98. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  99. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  100. </section>
  101. </aside>
  102. <div class="phpdocumentor-column -nine phpdocumentor-content">
  103. <section>
  104. <ul class="phpdocumentor-breadcrumbs">
  105. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  106. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcodetest.html">QRCodeTest</a></li>
  107. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcodetest-data.html">Data</a></li>
  108. </ul>
  109. <article class="phpdocumentor-element -class">
  110. <h2 class="phpdocumentor-content__title">
  111. ECITest
  112. <span class="phpdocumentor-element__extends">
  113. extends <abbr title="\PHPUnit\Framework\TestCase">TestCase</abbr>
  114. </span>
  115. <div class="phpdocumentor-element__package">
  116. in package
  117. <ul class="phpdocumentor-breadcrumbs">
  118. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  119. </ul>
  120. </div>
  121. </h2>
  122. <div class="phpdocumentor-label-line">
  123. <div class="phpdocumentor-label phpdocumentor-label--success"><span>Final</span><span>Yes</span></div>
  124. </div>
  125. <aside class="phpdocumentor-element-found-in">
  126. <abbr class="phpdocumentor-element-found-in__file" title="tests/Data/ECITest.php"><a href="files/tests-data-ecitest.html"><abbr title="tests/Data/ECITest.php">ECITest.php</abbr></a></abbr>
  127. :
  128. <span class="phpdocumentor-element-found-in__line">22</span>
  129. </aside>
  130. <p class="phpdocumentor-summary">Tests the ECI class</p>
  131. <h3 id="toc">
  132. Table of Contents
  133. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  134. </h3>
  135. <h4 id="toc-constants">
  136. Constants
  137. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#toc-constants" class="headerlink"><i class="fas fa-link"></i></a>
  138. </h4>
  139. <dl class="phpdocumentor-table-of-contents">
  140. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  141. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#constant_testData">testData</a>
  142. <span>
  143. &nbsp;= &#039;无可奈何燃花作香&#039; </span>
  144. </dt>
  145. </dl>
  146. <h4 id="toc-properties">
  147. Properties
  148. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#toc-properties" class="headerlink"><i class="fas fa-link"></i></a>
  149. </h4>
  150. <dl class="phpdocumentor-table-of-contents">
  151. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  152. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#property_QRData">$QRData</a>
  153. <span>
  154. &nbsp;: <a href="classes/chillerlan-QRCode-Data-QRData.html"><abbr title="\chillerlan\QRCode\Data\QRData">QRData</abbr></a> </span>
  155. </dt>
  156. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  157. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#property_testCharset">$testCharset</a>
  158. <span>
  159. &nbsp;: int </span>
  160. </dt>
  161. </dl>
  162. <h4 id="toc-methods">
  163. Methods
  164. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  165. </h4>
  166. <dl class="phpdocumentor-table-of-contents">
  167. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  168. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_eciCharsetIdProvider">eciCharsetIdProvider()</a>
  169. <span>
  170. &nbsp;: array&lt;string|int, mixed&gt; </span>
  171. </dt>
  172. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  173. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testConvertUnknownEncoding">testConvertUnknownEncoding()</a>
  174. <span>
  175. &nbsp;: void </span>
  176. </dt>
  177. <dd>Tests detection of an unknown character set</dd>
  178. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  179. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testDataModeInstance">testDataModeInstance()</a>
  180. <span>
  181. &nbsp;: void </span>
  182. </dt>
  183. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  184. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testDecodeECISegmentFollowedByInvalidModeException">testDecodeECISegmentFollowedByInvalidModeException()</a>
  185. <span>
  186. &nbsp;: void </span>
  187. </dt>
  188. <dd>Tests if and exception is thrown when the ECI segment is followed by a mode that is not 8-bit byte</dd>
  189. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  190. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testDecodeSegment">testDecodeSegment()</a>
  191. <span>
  192. &nbsp;: void </span>
  193. </dt>
  194. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  195. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testInvalidDataException">testInvalidDataException()</a>
  196. <span>
  197. &nbsp;: void </span>
  198. </dt>
  199. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  200. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testInvalidDataOnEmptyException">testInvalidDataOnEmptyException()</a>
  201. <span>
  202. &nbsp;: void </span>
  203. </dt>
  204. <dd>since the ECI class only accepts integer values,
  205. we&#039;ll use this test to check for the upper end of the accepted input range</dd>
  206. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  207. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testReadWrite">testReadWrite()</a>
  208. <span>
  209. &nbsp;: void </span>
  210. </dt>
  211. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  212. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_unknownEncodingDataProvider">unknownEncodingDataProvider()</a>
  213. <span>
  214. &nbsp;: array&lt;string|int, mixed&gt; </span>
  215. </dt>
  216. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  217. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_versionBreakpointProvider">versionBreakpointProvider()</a>
  218. <span>
  219. &nbsp;: array&lt;string|int, mixed&gt; </span>
  220. </dt>
  221. <dd>returns versions within the version breakpoints 1-9, 10-26 and 27-40</dd>
  222. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  223. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_setUp">setUp()</a>
  224. <span>
  225. &nbsp;: void </span>
  226. </dt>
  227. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  228. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_getDataSegments">getDataSegments()</a>
  229. <span>
  230. &nbsp;: array&lt;string|int, mixed&gt; </span>
  231. </dt>
  232. </dl>
  233. <section class="phpdocumentor-constants">
  234. <h3 class="phpdocumentor-elements__header" id="constants">
  235. Constants
  236. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#constants" class="headerlink"><i class="fas fa-link"></i></a>
  237. </h3>
  238. <article class="phpdocumentor-element -constant -private ">
  239. <h4 class="phpdocumentor-element__name" id="constant_testData">
  240. testData
  241. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#constant_testData" class="headerlink"><i class="fas fa-link"></i></a>
  242. </h4>
  243. <aside class="phpdocumentor-element-found-in">
  244. <abbr class="phpdocumentor-element-found-in__file" title="tests/Data/ECITest.php"><a href="files/tests-data-ecitest.html"><abbr title="tests/Data/ECITest.php">ECITest.php</abbr></a></abbr>
  245. :
  246. <span class="phpdocumentor-element-found-in__line">27</span>
  247. </aside>
  248. <code class="phpdocumentor-signature phpdocumentor-code ">
  249. <span class="phpdocumentor-signature__visibility">private</span>
  250. <span class="phpdocumentor-signature__type">mixed</span>
  251. <span class="phpdocumentor-signature__name">testData</span>
  252. = <span class="phpdocumentor-signature__default-value">&#039;无可奈何燃花作香&#039;</span>
  253. </code>
  254. </article>
  255. </section>
  256. <section class="phpdocumentor-properties">
  257. <h3 class="phpdocumentor-elements__header" id="properties">
  258. Properties
  259. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  260. </h3>
  261. <article
  262. class="
  263. phpdocumentor-element
  264. -property
  265. -private
  266. "
  267. >
  268. <h4 class="phpdocumentor-element__name" id="property_QRData">
  269. $QRData
  270. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#property_QRData" class="headerlink"><i class="fas fa-link"></i></a>
  271. <span class="phpdocumentor-element__modifiers">
  272. </span>
  273. </h4>
  274. <aside class="phpdocumentor-element-found-in">
  275. <abbr class="phpdocumentor-element-found-in__file" title="tests/Data/ECITest.php"><a href="files/tests-data-ecitest.html"><abbr title="tests/Data/ECITest.php">ECITest.php</abbr></a></abbr>
  276. :
  277. <span class="phpdocumentor-element-found-in__line">24</span>
  278. </aside>
  279. <code class="phpdocumentor-code phpdocumentor-signature ">
  280. <span class="phpdocumentor-signature__visibility">private</span>
  281. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-Data-QRData.html"><abbr title="\chillerlan\QRCode\Data\QRData">QRData</abbr></a></span>
  282. <span class="phpdocumentor-signature__name">$QRData</span>
  283. </code>
  284. </article>
  285. <article
  286. class="
  287. phpdocumentor-element
  288. -property
  289. -private
  290. "
  291. >
  292. <h4 class="phpdocumentor-element__name" id="property_testCharset">
  293. $testCharset
  294. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#property_testCharset" class="headerlink"><i class="fas fa-link"></i></a>
  295. <span class="phpdocumentor-element__modifiers">
  296. </span>
  297. </h4>
  298. <aside class="phpdocumentor-element-found-in">
  299. <abbr class="phpdocumentor-element-found-in__file" title="tests/Data/ECITest.php"><a href="files/tests-data-ecitest.html"><abbr title="tests/Data/ECITest.php">ECITest.php</abbr></a></abbr>
  300. :
  301. <span class="phpdocumentor-element-found-in__line">25</span>
  302. </aside>
  303. <code class="phpdocumentor-code phpdocumentor-signature ">
  304. <span class="phpdocumentor-signature__visibility">private</span>
  305. <span class="phpdocumentor-signature__type">int</span>
  306. <span class="phpdocumentor-signature__name">$testCharset</span>
  307. = <span class="phpdocumentor-signature__default-value">\chillerlan\QRCode\Common\ECICharset::GB18030</span></code>
  308. </article>
  309. </section>
  310. <section class="phpdocumentor-methods">
  311. <h3 class="phpdocumentor-elements__header" id="methods">
  312. Methods
  313. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  314. </h3>
  315. <article
  316. class="phpdocumentor-element
  317. -method
  318. -public
  319. -static "
  320. >
  321. <h4 class="phpdocumentor-element__name" id="method_eciCharsetIdProvider">
  322. eciCharsetIdProvider()
  323. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_eciCharsetIdProvider" class="headerlink"><i class="fas fa-link"></i></a>
  324. </h4>
  325. <aside class="phpdocumentor-element-found-in">
  326. <abbr class="phpdocumentor-element-found-in__file" title="tests/Data/ECITest.php"><a href="files/tests-data-ecitest.html"><abbr title="tests/Data/ECITest.php">ECITest.php</abbr></a></abbr>
  327. :
  328. <span class="phpdocumentor-element-found-in__line">90</span>
  329. </aside>
  330. <code class="phpdocumentor-code phpdocumentor-signature ">
  331. <span class="phpdocumentor-signature__visibility">public</span>
  332. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">eciCharsetIdProvider</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  333. <div class="phpdocumentor-label-line">
  334. </div>
  335. <section>
  336. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  337. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  338. </section>
  339. </article>
  340. <article
  341. class="phpdocumentor-element
  342. -method
  343. -public
  344. "
  345. >
  346. <h4 class="phpdocumentor-element__name" id="method_testConvertUnknownEncoding">
  347. testConvertUnknownEncoding()
  348. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testConvertUnknownEncoding" class="headerlink"><i class="fas fa-link"></i></a>
  349. </h4>
  350. <aside class="phpdocumentor-element-found-in">
  351. <abbr class="phpdocumentor-element-found-in__file" title="tests/Data/ECITest.php"><a href="files/tests-data-ecitest.html"><abbr title="tests/Data/ECITest.php">ECITest.php</abbr></a></abbr>
  352. :
  353. <span class="phpdocumentor-element-found-in__line">142</span>
  354. </aside>
  355. <p class="phpdocumentor-summary">Tests detection of an unknown character set</p>
  356. <code class="phpdocumentor-code phpdocumentor-signature ">
  357. <span class="phpdocumentor-signature__visibility">public</span>
  358. <span class="phpdocumentor-signature__name">testConvertUnknownEncoding</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$id</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$data</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  359. <div class="phpdocumentor-label-line">
  360. </div>
  361. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  362. <dl class="phpdocumentor-argument-list">
  363. <dt class="phpdocumentor-argument-list__entry">
  364. <span class="phpdocumentor-signature__argument__name">$id</span>
  365. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  366. </dt>
  367. <dd class="phpdocumentor-argument-list__definition">
  368. </dd>
  369. <dt class="phpdocumentor-argument-list__entry">
  370. <span class="phpdocumentor-signature__argument__name">$data</span>
  371. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  372. </dt>
  373. <dd class="phpdocumentor-argument-list__definition">
  374. </dd>
  375. </dl>
  376. </article>
  377. <article
  378. class="phpdocumentor-element
  379. -method
  380. -public
  381. "
  382. >
  383. <h4 class="phpdocumentor-element__name" id="method_testDataModeInstance">
  384. testDataModeInstance()
  385. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testDataModeInstance" class="headerlink"><i class="fas fa-link"></i></a>
  386. </h4>
  387. <aside class="phpdocumentor-element-found-in">
  388. <abbr class="phpdocumentor-element-found-in__file" title="tests/Data/ECITest.php"><a href="files/tests-data-ecitest.html"><abbr title="tests/Data/ECITest.php">ECITest.php</abbr></a></abbr>
  389. :
  390. <span class="phpdocumentor-element-found-in__line">41</span>
  391. </aside>
  392. <code class="phpdocumentor-code phpdocumentor-signature ">
  393. <span class="phpdocumentor-signature__visibility">public</span>
  394. <span class="phpdocumentor-signature__name">testDataModeInstance</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  395. <div class="phpdocumentor-label-line">
  396. </div>
  397. </article>
  398. <article
  399. class="phpdocumentor-element
  400. -method
  401. -public
  402. "
  403. >
  404. <h4 class="phpdocumentor-element__name" id="method_testDecodeECISegmentFollowedByInvalidModeException">
  405. testDecodeECISegmentFollowedByInvalidModeException()
  406. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testDecodeECISegmentFollowedByInvalidModeException" class="headerlink"><i class="fas fa-link"></i></a>
  407. </h4>
  408. <aside class="phpdocumentor-element-found-in">
  409. <abbr class="phpdocumentor-element-found-in__file" title="tests/Data/ECITest.php"><a href="files/tests-data-ecitest.html"><abbr title="tests/Data/ECITest.php">ECITest.php</abbr></a></abbr>
  410. :
  411. <span class="phpdocumentor-element-found-in__line">114</span>
  412. </aside>
  413. <p class="phpdocumentor-summary">Tests if and exception is thrown when the ECI segment is followed by a mode that is not 8-bit byte</p>
  414. <code class="phpdocumentor-code phpdocumentor-signature ">
  415. <span class="phpdocumentor-signature__visibility">public</span>
  416. <span class="phpdocumentor-signature__name">testDecodeECISegmentFollowedByInvalidModeException</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  417. <div class="phpdocumentor-label-line">
  418. </div>
  419. </article>
  420. <article
  421. class="phpdocumentor-element
  422. -method
  423. -public
  424. "
  425. >
  426. <h4 class="phpdocumentor-element__name" id="method_testDecodeSegment">
  427. testDecodeSegment()
  428. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testDecodeSegment" class="headerlink"><i class="fas fa-link"></i></a>
  429. </h4>
  430. <aside class="phpdocumentor-element-found-in">
  431. <abbr class="phpdocumentor-element-found-in__file" title="tests/Data/ECITest.php"><a href="files/tests-data-ecitest.html"><abbr title="tests/Data/ECITest.php">ECITest.php</abbr></a></abbr>
  432. :
  433. <span class="phpdocumentor-element-found-in__line">54</span>
  434. </aside>
  435. <code class="phpdocumentor-code phpdocumentor-signature ">
  436. <span class="phpdocumentor-signature__visibility">public</span>
  437. <span class="phpdocumentor-signature__name">testDecodeSegment</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$version</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  438. <div class="phpdocumentor-label-line">
  439. </div>
  440. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  441. <dl class="phpdocumentor-argument-list">
  442. <dt class="phpdocumentor-argument-list__entry">
  443. <span class="phpdocumentor-signature__argument__name">$version</span>
  444. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  445. </dt>
  446. <dd class="phpdocumentor-argument-list__definition">
  447. </dd>
  448. </dl>
  449. </article>
  450. <article
  451. class="phpdocumentor-element
  452. -method
  453. -public
  454. "
  455. >
  456. <h4 class="phpdocumentor-element__name" id="method_testInvalidDataException">
  457. testInvalidDataException()
  458. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testInvalidDataException" class="headerlink"><i class="fas fa-link"></i></a>
  459. </h4>
  460. <aside class="phpdocumentor-element-found-in">
  461. <abbr class="phpdocumentor-element-found-in__file" title="tests/Data/ECITest.php"><a href="files/tests-data-ecitest.html"><abbr title="tests/Data/ECITest.php">ECITest.php</abbr></a></abbr>
  462. :
  463. <span class="phpdocumentor-element-found-in__line">72</span>
  464. </aside>
  465. <code class="phpdocumentor-code phpdocumentor-signature ">
  466. <span class="phpdocumentor-signature__visibility">public</span>
  467. <span class="phpdocumentor-signature__name">testInvalidDataException</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  468. <div class="phpdocumentor-label-line">
  469. </div>
  470. </article>
  471. <article
  472. class="phpdocumentor-element
  473. -method
  474. -public
  475. "
  476. >
  477. <h4 class="phpdocumentor-element__name" id="method_testInvalidDataOnEmptyException">
  478. testInvalidDataOnEmptyException()
  479. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testInvalidDataOnEmptyException" class="headerlink"><i class="fas fa-link"></i></a>
  480. </h4>
  481. <aside class="phpdocumentor-element-found-in">
  482. <abbr class="phpdocumentor-element-found-in__file" title="tests/Data/ECITest.php"><a href="files/tests-data-ecitest.html"><abbr title="tests/Data/ECITest.php">ECITest.php</abbr></a></abbr>
  483. :
  484. <span class="phpdocumentor-element-found-in__line">83</span>
  485. </aside>
  486. <p class="phpdocumentor-summary">since the ECI class only accepts integer values,
  487. we&#039;ll use this test to check for the upper end of the accepted input range</p>
  488. <code class="phpdocumentor-code phpdocumentor-signature ">
  489. <span class="phpdocumentor-signature__visibility">public</span>
  490. <span class="phpdocumentor-signature__name">testInvalidDataOnEmptyException</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  491. <div class="phpdocumentor-label-line">
  492. </div>
  493. </article>
  494. <article
  495. class="phpdocumentor-element
  496. -method
  497. -public
  498. "
  499. >
  500. <h4 class="phpdocumentor-element__name" id="method_testReadWrite">
  501. testReadWrite()
  502. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testReadWrite" class="headerlink"><i class="fas fa-link"></i></a>
  503. </h4>
  504. <aside class="phpdocumentor-element-found-in">
  505. <abbr class="phpdocumentor-element-found-in__file" title="tests/Data/ECITest.php"><a href="files/tests-data-ecitest.html"><abbr title="tests/Data/ECITest.php">ECITest.php</abbr></a></abbr>
  506. :
  507. <span class="phpdocumentor-element-found-in__line">101</span>
  508. </aside>
  509. <code class="phpdocumentor-code phpdocumentor-signature ">
  510. <span class="phpdocumentor-signature__visibility">public</span>
  511. <span class="phpdocumentor-signature__name">testReadWrite</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$id</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$lengthInBits</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  512. <div class="phpdocumentor-label-line">
  513. </div>
  514. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  515. <dl class="phpdocumentor-argument-list">
  516. <dt class="phpdocumentor-argument-list__entry">
  517. <span class="phpdocumentor-signature__argument__name">$id</span>
  518. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  519. </dt>
  520. <dd class="phpdocumentor-argument-list__definition">
  521. </dd>
  522. <dt class="phpdocumentor-argument-list__entry">
  523. <span class="phpdocumentor-signature__argument__name">$lengthInBits</span>
  524. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  525. </dt>
  526. <dd class="phpdocumentor-argument-list__definition">
  527. </dd>
  528. </dl>
  529. </article>
  530. <article
  531. class="phpdocumentor-element
  532. -method
  533. -public
  534. -static "
  535. >
  536. <h4 class="phpdocumentor-element__name" id="method_unknownEncodingDataProvider">
  537. unknownEncodingDataProvider()
  538. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_unknownEncodingDataProvider" class="headerlink"><i class="fas fa-link"></i></a>
  539. </h4>
  540. <aside class="phpdocumentor-element-found-in">
  541. <abbr class="phpdocumentor-element-found-in__file" title="tests/Data/ECITest.php"><a href="files/tests-data-ecitest.html"><abbr title="tests/Data/ECITest.php">ECITest.php</abbr></a></abbr>
  542. :
  543. <span class="phpdocumentor-element-found-in__line">132</span>
  544. </aside>
  545. <code class="phpdocumentor-code phpdocumentor-signature ">
  546. <span class="phpdocumentor-signature__visibility">public</span>
  547. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">unknownEncodingDataProvider</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  548. <div class="phpdocumentor-label-line">
  549. </div>
  550. <section>
  551. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  552. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  553. </section>
  554. </article>
  555. <article
  556. class="phpdocumentor-element
  557. -method
  558. -public
  559. -static "
  560. >
  561. <h4 class="phpdocumentor-element__name" id="method_versionBreakpointProvider">
  562. versionBreakpointProvider()
  563. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_versionBreakpointProvider" class="headerlink"><i class="fas fa-link"></i></a>
  564. </h4>
  565. <aside class="phpdocumentor-element-found-in">
  566. <abbr class="phpdocumentor-element-found-in__file" title="tests/Data/ECITest.php"><a href="files/tests-data-ecitest.html"><abbr title="tests/Data/ECITest.php">ECITest.php</abbr></a></abbr>
  567. :
  568. <span class="phpdocumentor-element-found-in__line">50</span>
  569. </aside>
  570. <p class="phpdocumentor-summary">returns versions within the version breakpoints 1-9, 10-26 and 27-40</p>
  571. <code class="phpdocumentor-code phpdocumentor-signature ">
  572. <span class="phpdocumentor-signature__visibility">public</span>
  573. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">versionBreakpointProvider</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  574. <div class="phpdocumentor-label-line">
  575. </div>
  576. <section>
  577. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  578. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  579. </section>
  580. </article>
  581. <article
  582. class="phpdocumentor-element
  583. -method
  584. -protected
  585. "
  586. >
  587. <h4 class="phpdocumentor-element__name" id="method_setUp">
  588. setUp()
  589. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_setUp" class="headerlink"><i class="fas fa-link"></i></a>
  590. </h4>
  591. <aside class="phpdocumentor-element-found-in">
  592. <abbr class="phpdocumentor-element-found-in__file" title="tests/Data/ECITest.php"><a href="files/tests-data-ecitest.html"><abbr title="tests/Data/ECITest.php">ECITest.php</abbr></a></abbr>
  593. :
  594. <span class="phpdocumentor-element-found-in__line">29</span>
  595. </aside>
  596. <code class="phpdocumentor-code phpdocumentor-signature ">
  597. <span class="phpdocumentor-signature__visibility">protected</span>
  598. <span class="phpdocumentor-signature__name">setUp</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  599. <div class="phpdocumentor-label-line">
  600. </div>
  601. </article>
  602. <article
  603. class="phpdocumentor-element
  604. -method
  605. -private
  606. "
  607. >
  608. <h4 class="phpdocumentor-element__name" id="method_getDataSegments">
  609. getDataSegments()
  610. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_getDataSegments" class="headerlink"><i class="fas fa-link"></i></a>
  611. </h4>
  612. <aside class="phpdocumentor-element-found-in">
  613. <abbr class="phpdocumentor-element-found-in__file" title="tests/Data/ECITest.php"><a href="files/tests-data-ecitest.html"><abbr title="tests/Data/ECITest.php">ECITest.php</abbr></a></abbr>
  614. :
  615. <span class="phpdocumentor-element-found-in__line">33</span>
  616. </aside>
  617. <code class="phpdocumentor-code phpdocumentor-signature ">
  618. <span class="phpdocumentor-signature__visibility">private</span>
  619. <span class="phpdocumentor-signature__name">getDataSegments</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  620. <div class="phpdocumentor-label-line">
  621. </div>
  622. <section>
  623. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  624. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  625. </section>
  626. </article>
  627. </section>
  628. <div class="phpdocumentor-modal" id="source-view">
  629. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  630. <div class="phpdocumentor-modal-container">
  631. <div class="phpdocumentor-modal-content">
  632. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/tests/Data/ECITest.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  633. </div>
  634. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  635. </div>
  636. </div>
  637. <script type="text/javascript">
  638. (function () {
  639. function loadExternalCodeSnippet(el, url, line) {
  640. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  641. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  642. const language = 'php';
  643. const code = document.createElement('code');
  644. code.className = 'language-' + language;
  645. pre.textContent = '';
  646. pre.setAttribute('data-line', line)
  647. code.textContent = 'Loading…';
  648. pre.appendChild(code);
  649. var xhr = new XMLHttpRequest();
  650. xhr.open('GET', src, true);
  651. xhr.onreadystatechange = function () {
  652. if (xhr.readyState !== 4) {
  653. return;
  654. }
  655. if (xhr.status < 400 && xhr.responseText) {
  656. code.textContent = xhr.responseText;
  657. Prism.highlightElement(code);
  658. return;
  659. }
  660. if (xhr.status === 404) {
  661. code.textContent = '✖ Error: File could not be found';
  662. return;
  663. }
  664. if (xhr.status >= 400) {
  665. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  666. return;
  667. }
  668. code.textContent = '✖ Error: An unknown error occurred';
  669. };
  670. xhr.send(null);
  671. });
  672. }
  673. const modalButtons = document.querySelectorAll("[data-modal]");
  674. const openedAsLocalFile = window.location.protocol === 'file:';
  675. if (modalButtons.length > 0 && openedAsLocalFile) {
  676. console.warn(
  677. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  678. 'browsers block XHR requests when a page is opened this way'
  679. );
  680. }
  681. modalButtons.forEach(function (trigger) {
  682. if (openedAsLocalFile) {
  683. trigger.setAttribute("hidden", "hidden");
  684. }
  685. trigger.addEventListener("click", function (event) {
  686. event.preventDefault();
  687. const modal = document.getElementById(trigger.dataset.modal);
  688. if (!modal) {
  689. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  690. return;
  691. }
  692. modal.classList.add("phpdocumentor-modal__open");
  693. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  694. const exits = modal.querySelectorAll("[data-exit-button]");
  695. exits.forEach(function (exit) {
  696. exit.addEventListener("click", function (event) {
  697. event.preventDefault();
  698. modal.classList.remove("phpdocumentor-modal__open");
  699. });
  700. });
  701. });
  702. });
  703. })();
  704. </script>
  705. </article>
  706. </section>
  707. <section class="phpdocumentor-on-this-page__sidebar">
  708. <section class="phpdocumentor-on-this-page__content">
  709. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  710. <ul class="phpdocumentor-list -clean">
  711. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  712. <li>
  713. <ul class="phpdocumentor-list -clean">
  714. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#toc-constants">Constants</a></li>
  715. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#toc-properties">Properties</a></li>
  716. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#toc-methods">Methods</a></li>
  717. </ul>
  718. </li>
  719. <li class="phpdocumentor-on-this-page-section__title">Constants</li>
  720. <li>
  721. <ul class="phpdocumentor-list -clean">
  722. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#constant_testData">testData</a></li>
  723. </ul>
  724. </li>
  725. <li class="phpdocumentor-on-this-page-section__title">Properties</li>
  726. <li>
  727. <ul class="phpdocumentor-list -clean">
  728. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#property_QRData">$QRData<a href="classes/chillerlan-QRCodeTest-Data-ECITest.html"></li>
  729. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#property_testCharset">$testCharset<a href="classes/chillerlan-QRCodeTest-Data-ECITest.html"></li>
  730. </ul>
  731. </li>
  732. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  733. <li>
  734. <ul class="phpdocumentor-list -clean">
  735. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_eciCharsetIdProvider">eciCharsetIdProvider()</a></li>
  736. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testConvertUnknownEncoding">testConvertUnknownEncoding()</a></li>
  737. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testDataModeInstance">testDataModeInstance()</a></li>
  738. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testDecodeECISegmentFollowedByInvalidModeException">testDecodeECISegmentFollowedByInvalidModeException()</a></li>
  739. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testDecodeSegment">testDecodeSegment()</a></li>
  740. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testInvalidDataException">testInvalidDataException()</a></li>
  741. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testInvalidDataOnEmptyException">testInvalidDataOnEmptyException()</a></li>
  742. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_testReadWrite">testReadWrite()</a></li>
  743. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_unknownEncodingDataProvider">unknownEncodingDataProvider()</a></li>
  744. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_versionBreakpointProvider">versionBreakpointProvider()</a></li>
  745. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_setUp">setUp()</a></li>
  746. <li><a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#method_getDataSegments">getDataSegments()</a></li>
  747. </ul>
  748. </li>
  749. </ul>
  750. </section>
  751. </section>
  752. </div>
  753. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  754. <section class="phpdocumentor-search-results__dialog">
  755. <header class="phpdocumentor-search-results__header">
  756. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  757. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  758. </header>
  759. <section class="phpdocumentor-search-results__body">
  760. <ul class="phpdocumentor-search-results__entries"></ul>
  761. </section>
  762. </section>
  763. </section>
  764. </div>
  765. <a href="classes/chillerlan-QRCodeTest-Data-ECITest.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  766. </main>
  767. <script>
  768. cssVars({});
  769. </script>
  770. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  771. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  772. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  773. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  774. </body>
  775. </html>