chillerlan-QRCodeTest-Common-MaskPatternTest.html 33 KB

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