chillerlan-QRCodeTest-Common-MaskPatternTest.html 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705
  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-common.html">Common</a></li>
  108. </ul>
  109. <article class="phpdocumentor-element -class">
  110. <h2 class="phpdocumentor-content__title">
  111. MaskPatternTest
  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/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  127. :
  128. <span class="phpdocumentor-element-found-in__line">25</span>
  129. </aside>
  130. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  131. Tags
  132. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#tags" class="headerlink"><i class="fas fa-link"></i></a>
  133. </h5>
  134. <dl class="phpdocumentor-tag-list">
  135. <dt class="phpdocumentor-tag-list__entry">
  136. <span class="phpdocumentor-tag__name">see</span>
  137. </dt>
  138. <dd class="phpdocumentor-tag-list__definition">
  139. <span class="phpdocumentor-tag-link"><a href="https://github.com/zxing/zxing/blob/f4f3c2971dc794346d8b6e14752200008cb90716/core/src/test/java/com/google/zxing/qrcode/encoder/MaskUtilTestCase.java">https://github.com/zxing/zxing/blob/f4f3c2971dc794346d8b6e14752200008cb90716/core/src/test/java/com/google/zxing/qrcode/encoder/MaskUtilTestCase.java</a></span>
  140. </dd>
  141. </dl>
  142. <h3 id="toc">
  143. Table of Contents
  144. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  145. </h3>
  146. <h4 id="toc-methods">
  147. Methods
  148. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#toc-methods" 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 -method -public">
  152. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_maskPatternProvider">maskPatternProvider()</a>
  153. <span>
  154. &nbsp;: array&lt;string|int, mixed&gt; </span>
  155. </dt>
  156. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  157. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_testInvalidMaskPatternException">testInvalidMaskPatternException()</a>
  158. <span>
  159. &nbsp;: void </span>
  160. </dt>
  161. <dd>Tests if an exception is thrown on an incorrect mask pattern</dd>
  162. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  163. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_testMask">testMask()</a>
  164. <span>
  165. &nbsp;: void </span>
  166. </dt>
  167. <dd>Tests if the mask function generates the correct pattern</dd>
  168. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  169. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_testPenaltyRule1">testPenaltyRule1()</a>
  170. <span>
  171. &nbsp;: void </span>
  172. </dt>
  173. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  174. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_testPenaltyRule2">testPenaltyRule2()</a>
  175. <span>
  176. &nbsp;: void </span>
  177. </dt>
  178. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  179. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_testPenaltyRule3">testPenaltyRule3()</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-Common-MaskPatternTest.html#method_testPenaltyRule4">testPenaltyRule4()</a>
  185. <span>
  186. &nbsp;: void </span>
  187. </dt>
  188. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  189. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_assertMask">assertMask()</a>
  190. <span>
  191. &nbsp;: bool </span>
  192. </dt>
  193. </dl>
  194. <section class="phpdocumentor-methods">
  195. <h3 class="phpdocumentor-elements__header" id="methods">
  196. Methods
  197. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  198. </h3>
  199. <article
  200. class="phpdocumentor-element
  201. -method
  202. -public
  203. -static "
  204. >
  205. <h4 class="phpdocumentor-element__name" id="method_maskPatternProvider">
  206. maskPatternProvider()
  207. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_maskPatternProvider" class="headerlink"><i class="fas fa-link"></i></a>
  208. </h4>
  209. <aside class="phpdocumentor-element-found-in">
  210. <abbr class="phpdocumentor-element-found-in__file" title="tests/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  211. :
  212. <span class="phpdocumentor-element-found-in__line">28</span>
  213. </aside>
  214. <code class="phpdocumentor-code phpdocumentor-signature ">
  215. <span class="phpdocumentor-signature__visibility">public</span>
  216. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">maskPatternProvider</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  217. <div class="phpdocumentor-label-line">
  218. </div>
  219. <section>
  220. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  221. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  222. </section>
  223. </article>
  224. <article
  225. class="phpdocumentor-element
  226. -method
  227. -public
  228. "
  229. >
  230. <h4 class="phpdocumentor-element__name" id="method_testInvalidMaskPatternException">
  231. testInvalidMaskPatternException()
  232. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_testInvalidMaskPatternException" class="headerlink"><i class="fas fa-link"></i></a>
  233. </h4>
  234. <aside class="phpdocumentor-element-found-in">
  235. <abbr class="phpdocumentor-element-found-in__file" title="tests/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  236. :
  237. <span class="phpdocumentor-element-found-in__line">123</span>
  238. </aside>
  239. <p class="phpdocumentor-summary">Tests if an exception is thrown on an incorrect mask pattern</p>
  240. <code class="phpdocumentor-code phpdocumentor-signature ">
  241. <span class="phpdocumentor-signature__visibility">public</span>
  242. <span class="phpdocumentor-signature__name">testInvalidMaskPatternException</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  243. <div class="phpdocumentor-label-line">
  244. </div>
  245. </article>
  246. <article
  247. class="phpdocumentor-element
  248. -method
  249. -public
  250. "
  251. >
  252. <h4 class="phpdocumentor-element__name" id="method_testMask">
  253. testMask()
  254. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_testMask" class="headerlink"><i class="fas fa-link"></i></a>
  255. </h4>
  256. <aside class="phpdocumentor-element-found-in">
  257. <abbr class="phpdocumentor-element-found-in__file" title="tests/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  258. :
  259. <span class="phpdocumentor-element-found-in__line">100</span>
  260. </aside>
  261. <p class="phpdocumentor-summary">Tests if the mask function generates the correct pattern</p>
  262. <code class="phpdocumentor-code phpdocumentor-signature ">
  263. <span class="phpdocumentor-signature__visibility">public</span>
  264. <span class="phpdocumentor-signature__name">testMask</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$pattern</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$expected</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  265. <div class="phpdocumentor-label-line">
  266. </div>
  267. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  268. <dl class="phpdocumentor-argument-list">
  269. <dt class="phpdocumentor-argument-list__entry">
  270. <span class="phpdocumentor-signature__argument__name">$pattern</span>
  271. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  272. </dt>
  273. <dd class="phpdocumentor-argument-list__definition">
  274. </dd>
  275. <dt class="phpdocumentor-argument-list__entry">
  276. <span class="phpdocumentor-signature__argument__name">$expected</span>
  277. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  278. </dt>
  279. <dd class="phpdocumentor-argument-list__definition">
  280. </dd>
  281. </dl>
  282. </article>
  283. <article
  284. class="phpdocumentor-element
  285. -method
  286. -public
  287. "
  288. >
  289. <h4 class="phpdocumentor-element__name" id="method_testPenaltyRule1">
  290. testPenaltyRule1()
  291. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_testPenaltyRule1" class="headerlink"><i class="fas fa-link"></i></a>
  292. </h4>
  293. <aside class="phpdocumentor-element-found-in">
  294. <abbr class="phpdocumentor-element-found-in__file" title="tests/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  295. :
  296. <span class="phpdocumentor-element-found-in__line">130</span>
  297. </aside>
  298. <code class="phpdocumentor-code phpdocumentor-signature ">
  299. <span class="phpdocumentor-signature__visibility">public</span>
  300. <span class="phpdocumentor-signature__name">testPenaltyRule1</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  301. <div class="phpdocumentor-label-line">
  302. </div>
  303. </article>
  304. <article
  305. class="phpdocumentor-element
  306. -method
  307. -public
  308. "
  309. >
  310. <h4 class="phpdocumentor-element__name" id="method_testPenaltyRule2">
  311. testPenaltyRule2()
  312. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_testPenaltyRule2" class="headerlink"><i class="fas fa-link"></i></a>
  313. </h4>
  314. <aside class="phpdocumentor-element-found-in">
  315. <abbr class="phpdocumentor-element-found-in__file" title="tests/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  316. :
  317. <span class="phpdocumentor-element-found-in__line">141</span>
  318. </aside>
  319. <code class="phpdocumentor-code phpdocumentor-signature ">
  320. <span class="phpdocumentor-signature__visibility">public</span>
  321. <span class="phpdocumentor-signature__name">testPenaltyRule2</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  322. <div class="phpdocumentor-label-line">
  323. </div>
  324. </article>
  325. <article
  326. class="phpdocumentor-element
  327. -method
  328. -public
  329. "
  330. >
  331. <h4 class="phpdocumentor-element__name" id="method_testPenaltyRule3">
  332. testPenaltyRule3()
  333. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_testPenaltyRule3" class="headerlink"><i class="fas fa-link"></i></a>
  334. </h4>
  335. <aside class="phpdocumentor-element-found-in">
  336. <abbr class="phpdocumentor-element-found-in__file" title="tests/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  337. :
  338. <span class="phpdocumentor-element-found-in__line">148</span>
  339. </aside>
  340. <code class="phpdocumentor-code phpdocumentor-signature ">
  341. <span class="phpdocumentor-signature__visibility">public</span>
  342. <span class="phpdocumentor-signature__name">testPenaltyRule3</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  343. <div class="phpdocumentor-label-line">
  344. </div>
  345. </article>
  346. <article
  347. class="phpdocumentor-element
  348. -method
  349. -public
  350. "
  351. >
  352. <h4 class="phpdocumentor-element__name" id="method_testPenaltyRule4">
  353. testPenaltyRule4()
  354. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_testPenaltyRule4" class="headerlink"><i class="fas fa-link"></i></a>
  355. </h4>
  356. <aside class="phpdocumentor-element-found-in">
  357. <abbr class="phpdocumentor-element-found-in__file" title="tests/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  358. :
  359. <span class="phpdocumentor-element-found-in__line">159</span>
  360. </aside>
  361. <code class="phpdocumentor-code phpdocumentor-signature ">
  362. <span class="phpdocumentor-signature__visibility">public</span>
  363. <span class="phpdocumentor-signature__name">testPenaltyRule4</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  364. <div class="phpdocumentor-label-line">
  365. </div>
  366. </article>
  367. <article
  368. class="phpdocumentor-element
  369. -method
  370. -private
  371. "
  372. >
  373. <h4 class="phpdocumentor-element__name" id="method_assertMask">
  374. assertMask()
  375. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_assertMask" class="headerlink"><i class="fas fa-link"></i></a>
  376. </h4>
  377. <aside class="phpdocumentor-element-found-in">
  378. <abbr class="phpdocumentor-element-found-in__file" title="tests/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  379. :
  380. <span class="phpdocumentor-element-found-in__line">107</span>
  381. </aside>
  382. <code class="phpdocumentor-code phpdocumentor-signature ">
  383. <span class="phpdocumentor-signature__visibility">private</span>
  384. <span class="phpdocumentor-signature__name">assertMask</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><abbr title="\Closure">Closure</abbr>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$mask</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$expected</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  385. <div class="phpdocumentor-label-line">
  386. </div>
  387. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  388. <dl class="phpdocumentor-argument-list">
  389. <dt class="phpdocumentor-argument-list__entry">
  390. <span class="phpdocumentor-signature__argument__name">$mask</span>
  391. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\Closure">Closure</abbr></span>
  392. </dt>
  393. <dd class="phpdocumentor-argument-list__definition">
  394. </dd>
  395. <dt class="phpdocumentor-argument-list__entry">
  396. <span class="phpdocumentor-signature__argument__name">$expected</span>
  397. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
  398. </dt>
  399. <dd class="phpdocumentor-argument-list__definition">
  400. </dd>
  401. </dl>
  402. <section>
  403. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  404. <span class="phpdocumentor-signature__response_type">bool</span>
  405. </section>
  406. </article>
  407. </section>
  408. <div class="phpdocumentor-modal" id="source-view">
  409. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  410. <div class="phpdocumentor-modal-container">
  411. <div class="phpdocumentor-modal-content">
  412. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/tests/Common/MaskPatternTest.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  413. </div>
  414. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  415. </div>
  416. </div>
  417. <script type="text/javascript">
  418. (function () {
  419. function loadExternalCodeSnippet(el, url, line) {
  420. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  421. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  422. const language = 'php';
  423. const code = document.createElement('code');
  424. code.className = 'language-' + language;
  425. pre.textContent = '';
  426. pre.setAttribute('data-line', line)
  427. code.textContent = 'Loading…';
  428. pre.appendChild(code);
  429. var xhr = new XMLHttpRequest();
  430. xhr.open('GET', src, true);
  431. xhr.onreadystatechange = function () {
  432. if (xhr.readyState !== 4) {
  433. return;
  434. }
  435. if (xhr.status < 400 && xhr.responseText) {
  436. code.textContent = xhr.responseText;
  437. Prism.highlightElement(code);
  438. return;
  439. }
  440. if (xhr.status === 404) {
  441. code.textContent = '✖ Error: File could not be found';
  442. return;
  443. }
  444. if (xhr.status >= 400) {
  445. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  446. return;
  447. }
  448. code.textContent = '✖ Error: An unknown error occurred';
  449. };
  450. xhr.send(null);
  451. });
  452. }
  453. const modalButtons = document.querySelectorAll("[data-modal]");
  454. const openedAsLocalFile = window.location.protocol === 'file:';
  455. if (modalButtons.length > 0 && openedAsLocalFile) {
  456. console.warn(
  457. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  458. 'browsers block XHR requests when a page is opened this way'
  459. );
  460. }
  461. modalButtons.forEach(function (trigger) {
  462. if (openedAsLocalFile) {
  463. trigger.setAttribute("hidden", "hidden");
  464. }
  465. trigger.addEventListener("click", function (event) {
  466. event.preventDefault();
  467. const modal = document.getElementById(trigger.dataset.modal);
  468. if (!modal) {
  469. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  470. return;
  471. }
  472. modal.classList.add("phpdocumentor-modal__open");
  473. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  474. const exits = modal.querySelectorAll("[data-exit-button]");
  475. exits.forEach(function (exit) {
  476. exit.addEventListener("click", function (event) {
  477. event.preventDefault();
  478. modal.classList.remove("phpdocumentor-modal__open");
  479. });
  480. });
  481. });
  482. });
  483. })();
  484. </script>
  485. </article>
  486. </section>
  487. <section class="phpdocumentor-on-this-page__sidebar">
  488. <section class="phpdocumentor-on-this-page__content">
  489. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  490. <ul class="phpdocumentor-list -clean">
  491. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  492. <li>
  493. <ul class="phpdocumentor-list -clean">
  494. <li><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#toc-methods">Methods</a></li>
  495. </ul>
  496. </li>
  497. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  498. <li>
  499. <ul class="phpdocumentor-list -clean">
  500. <li><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_maskPatternProvider">maskPatternProvider()</a></li>
  501. <li><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_testInvalidMaskPatternException">testInvalidMaskPatternException()</a></li>
  502. <li><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_testMask">testMask()</a></li>
  503. <li><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_testPenaltyRule1">testPenaltyRule1()</a></li>
  504. <li><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_testPenaltyRule2">testPenaltyRule2()</a></li>
  505. <li><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_testPenaltyRule3">testPenaltyRule3()</a></li>
  506. <li><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_testPenaltyRule4">testPenaltyRule4()</a></li>
  507. <li><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_assertMask">assertMask()</a></li>
  508. </ul>
  509. </li>
  510. </ul>
  511. </section>
  512. </section>
  513. </div>
  514. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  515. <section class="phpdocumentor-search-results__dialog">
  516. <header class="phpdocumentor-search-results__header">
  517. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  518. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  519. </header>
  520. <section class="phpdocumentor-search-results__body">
  521. <ul class="phpdocumentor-search-results__entries"></ul>
  522. </section>
  523. </section>
  524. </section>
  525. </div>
  526. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  527. </main>
  528. <script>
  529. cssVars({});
  530. </script>
  531. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  532. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  533. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  534. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  535. </body>
  536. </html>