chillerlan-QRCodeTest-QRCodeTest.html 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009
  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. </ul>
  108. <article class="phpdocumentor-element -class">
  109. <h2 class="phpdocumentor-content__title">
  110. QRCodeTest
  111. <span class="phpdocumentor-element__extends">
  112. extends <abbr title="\PHPUnit\Framework\TestCase">TestCase</abbr>
  113. </span>
  114. <div class="phpdocumentor-element__package">
  115. in package
  116. <ul class="phpdocumentor-breadcrumbs">
  117. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  118. </ul>
  119. </div>
  120. <span class="phpdocumentor-element__extends">
  121. Uses
  122. <a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html"><abbr title="\chillerlan\QRCodeTest\BuildDirTrait">BuildDirTrait</abbr></a> </span>
  123. </h2>
  124. <div class="phpdocumentor-label-line">
  125. <div class="phpdocumentor-label phpdocumentor-label--success"><span>Final</span><span>Yes</span></div>
  126. </div>
  127. <aside class="phpdocumentor-element-found-in">
  128. <abbr class="phpdocumentor-element-found-in__file" title="tests/QRCodeTest.php"><a href="files/tests-qrcodetest.html"><abbr title="tests/QRCodeTest.php">QRCodeTest.php</abbr></a></abbr>
  129. :
  130. <span class="phpdocumentor-element-found-in__line">21</span>
  131. </aside>
  132. <p class="phpdocumentor-summary">Tests basic functions of the QRCode class</p>
  133. <h3 id="toc">
  134. Table of Contents
  135. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  136. </h3>
  137. <h4 id="toc-constants">
  138. Constants
  139. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#toc-constants" class="headerlink"><i class="fas fa-link"></i></a>
  140. </h4>
  141. <dl class="phpdocumentor-table-of-contents">
  142. <dt class="phpdocumentor-table-of-contents__entry -constant -private">
  143. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#constant_buildDir">buildDir</a>
  144. <span>
  145. &nbsp;= &#039;output-test&#039; </span>
  146. </dt>
  147. </dl>
  148. <h4 id="toc-properties">
  149. Properties
  150. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#toc-properties" class="headerlink"><i class="fas fa-link"></i></a>
  151. </h4>
  152. <dl class="phpdocumentor-table-of-contents">
  153. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  154. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#property_options">$options</a>
  155. <span>
  156. &nbsp;: <a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a> </span>
  157. </dt>
  158. <dt class="phpdocumentor-table-of-contents__entry -property -private">
  159. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#property_qrcode">$qrcode</a>
  160. <span>
  161. &nbsp;: <a href="classes/chillerlan-QRCode-QRCode.html"><abbr title="\chillerlan\QRCode\QRCode">QRCode</abbr></a> </span>
  162. </dt>
  163. </dl>
  164. <h4 id="toc-methods">
  165. Methods
  166. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  167. </h4>
  168. <dl class="phpdocumentor-table-of-contents">
  169. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  170. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#method_testInitCustomOutputInterfaceNotExistsException">testInitCustomOutputInterfaceNotExistsException()</a>
  171. <span>
  172. &nbsp;: void </span>
  173. </dt>
  174. <dd>tests if an exception is thrown if the given output class does not exist</dd>
  175. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  176. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#method_testInitCustomOutputInterfaceNotImplementsException">testInitCustomOutputInterfaceNotImplementsException()</a>
  177. <span>
  178. &nbsp;: void </span>
  179. </dt>
  180. <dd>tests if an exception is thrown if the given output class does not implement QROutputInterface</dd>
  181. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  182. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#method_testRenderToCacheFile">testRenderToCacheFile()</a>
  183. <span>
  184. &nbsp;: void </span>
  185. </dt>
  186. <dd>Tests if a cache file is properly saved in the given path</dd>
  187. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  188. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#method_testSaveException">testSaveException()</a>
  189. <span>
  190. &nbsp;: void </span>
  191. </dt>
  192. <dd>Tests if an exception is thrown when trying to write a cache file to an invalid destination</dd>
  193. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  194. <a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_createBuildDir">createBuildDir()</a>
  195. <span>
  196. &nbsp;: void </span>
  197. </dt>
  198. <dd>attempts to create the build dir</dd>
  199. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  200. <a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_getBuildDir">getBuildDir()</a>
  201. <span>
  202. &nbsp;: string </span>
  203. </dt>
  204. <dd>returns the full (real) path to the given build path</dd>
  205. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  206. <a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_getBuildFileContent">getBuildFileContent()</a>
  207. <span>
  208. &nbsp;: string </span>
  209. </dt>
  210. <dd>returns the contents of the given build file</dd>
  211. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  212. <a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_getBuildFilePath">getBuildFilePath()</a>
  213. <span>
  214. &nbsp;: string </span>
  215. </dt>
  216. <dd>returns the full (real) path to the given build file</dd>
  217. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  218. <a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_getBuildPath">getBuildPath()</a>
  219. <span>
  220. &nbsp;: string </span>
  221. </dt>
  222. <dd>returns the full raw path to the build dir</dd>
  223. <dt class="phpdocumentor-table-of-contents__entry -method -protected">
  224. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#method_setUp">setUp()</a>
  225. <span>
  226. &nbsp;: void </span>
  227. </dt>
  228. <dd>invoke test instances</dd>
  229. </dl>
  230. <section class="phpdocumentor-constants">
  231. <h3 class="phpdocumentor-elements__header" id="constants">
  232. Constants
  233. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#constants" class="headerlink"><i class="fas fa-link"></i></a>
  234. </h3>
  235. <article class="phpdocumentor-element -constant -private ">
  236. <h4 class="phpdocumentor-element__name" id="constant_buildDir">
  237. buildDir
  238. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#constant_buildDir" class="headerlink"><i class="fas fa-link"></i></a>
  239. </h4>
  240. <aside class="phpdocumentor-element-found-in">
  241. <abbr class="phpdocumentor-element-found-in__file" title="tests/QRCodeTest.php"><a href="files/tests-qrcodetest.html"><abbr title="tests/QRCodeTest.php">QRCodeTest.php</abbr></a></abbr>
  242. :
  243. <span class="phpdocumentor-element-found-in__line">27</span>
  244. </aside>
  245. <code class="phpdocumentor-signature phpdocumentor-code ">
  246. <span class="phpdocumentor-signature__visibility">private</span>
  247. <span class="phpdocumentor-signature__type">mixed</span>
  248. <span class="phpdocumentor-signature__name">buildDir</span>
  249. = <span class="phpdocumentor-signature__default-value">&#039;output-test&#039;</span>
  250. </code>
  251. </article>
  252. </section>
  253. <section class="phpdocumentor-properties">
  254. <h3 class="phpdocumentor-elements__header" id="properties">
  255. Properties
  256. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
  257. </h3>
  258. <article
  259. class="
  260. phpdocumentor-element
  261. -property
  262. -private
  263. "
  264. >
  265. <h4 class="phpdocumentor-element__name" id="property_options">
  266. $options
  267. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#property_options" class="headerlink"><i class="fas fa-link"></i></a>
  268. <span class="phpdocumentor-element__modifiers">
  269. </span>
  270. </h4>
  271. <aside class="phpdocumentor-element-found-in">
  272. <abbr class="phpdocumentor-element-found-in__file" title="tests/QRCodeTest.php"><a href="files/tests-qrcodetest.html"><abbr title="tests/QRCodeTest.php">QRCodeTest.php</abbr></a></abbr>
  273. :
  274. <span class="phpdocumentor-element-found-in__line">25</span>
  275. </aside>
  276. <code class="phpdocumentor-code phpdocumentor-signature ">
  277. <span class="phpdocumentor-signature__visibility">private</span>
  278. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-QROptions.html"><abbr title="\chillerlan\QRCode\QROptions">QROptions</abbr></a></span>
  279. <span class="phpdocumentor-signature__name">$options</span>
  280. </code>
  281. </article>
  282. <article
  283. class="
  284. phpdocumentor-element
  285. -property
  286. -private
  287. "
  288. >
  289. <h4 class="phpdocumentor-element__name" id="property_qrcode">
  290. $qrcode
  291. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#property_qrcode" class="headerlink"><i class="fas fa-link"></i></a>
  292. <span class="phpdocumentor-element__modifiers">
  293. </span>
  294. </h4>
  295. <aside class="phpdocumentor-element-found-in">
  296. <abbr class="phpdocumentor-element-found-in__file" title="tests/QRCodeTest.php"><a href="files/tests-qrcodetest.html"><abbr title="tests/QRCodeTest.php">QRCodeTest.php</abbr></a></abbr>
  297. :
  298. <span class="phpdocumentor-element-found-in__line">24</span>
  299. </aside>
  300. <code class="phpdocumentor-code phpdocumentor-signature ">
  301. <span class="phpdocumentor-signature__visibility">private</span>
  302. <span class="phpdocumentor-signature__type"><a href="classes/chillerlan-QRCode-QRCode.html"><abbr title="\chillerlan\QRCode\QRCode">QRCode</abbr></a></span>
  303. <span class="phpdocumentor-signature__name">$qrcode</span>
  304. </code>
  305. </article>
  306. </section>
  307. <section class="phpdocumentor-methods">
  308. <h3 class="phpdocumentor-elements__header" id="methods">
  309. Methods
  310. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  311. </h3>
  312. <article
  313. class="phpdocumentor-element
  314. -method
  315. -public
  316. "
  317. >
  318. <h4 class="phpdocumentor-element__name" id="method_testInitCustomOutputInterfaceNotExistsException">
  319. testInitCustomOutputInterfaceNotExistsException()
  320. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#method_testInitCustomOutputInterfaceNotExistsException" class="headerlink"><i class="fas fa-link"></i></a>
  321. </h4>
  322. <aside class="phpdocumentor-element-found-in">
  323. <abbr class="phpdocumentor-element-found-in__file" title="tests/QRCodeTest.php"><a href="files/tests-qrcodetest.html"><abbr title="tests/QRCodeTest.php">QRCodeTest.php</abbr></a></abbr>
  324. :
  325. <span class="phpdocumentor-element-found-in__line">42</span>
  326. </aside>
  327. <p class="phpdocumentor-summary">tests if an exception is thrown if the given output class does not exist</p>
  328. <code class="phpdocumentor-code phpdocumentor-signature ">
  329. <span class="phpdocumentor-signature__visibility">public</span>
  330. <span class="phpdocumentor-signature__name">testInitCustomOutputInterfaceNotExistsException</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  331. <div class="phpdocumentor-label-line">
  332. </div>
  333. </article>
  334. <article
  335. class="phpdocumentor-element
  336. -method
  337. -public
  338. "
  339. >
  340. <h4 class="phpdocumentor-element__name" id="method_testInitCustomOutputInterfaceNotImplementsException">
  341. testInitCustomOutputInterfaceNotImplementsException()
  342. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#method_testInitCustomOutputInterfaceNotImplementsException" class="headerlink"><i class="fas fa-link"></i></a>
  343. </h4>
  344. <aside class="phpdocumentor-element-found-in">
  345. <abbr class="phpdocumentor-element-found-in__file" title="tests/QRCodeTest.php"><a href="files/tests-qrcodetest.html"><abbr title="tests/QRCodeTest.php">QRCodeTest.php</abbr></a></abbr>
  346. :
  347. <span class="phpdocumentor-element-found-in__line">54</span>
  348. </aside>
  349. <p class="phpdocumentor-summary">tests if an exception is thrown if the given output class does not implement QROutputInterface</p>
  350. <code class="phpdocumentor-code phpdocumentor-signature ">
  351. <span class="phpdocumentor-signature__visibility">public</span>
  352. <span class="phpdocumentor-signature__name">testInitCustomOutputInterfaceNotImplementsException</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  353. <div class="phpdocumentor-label-line">
  354. </div>
  355. </article>
  356. <article
  357. class="phpdocumentor-element
  358. -method
  359. -public
  360. "
  361. >
  362. <h4 class="phpdocumentor-element__name" id="method_testRenderToCacheFile">
  363. testRenderToCacheFile()
  364. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#method_testRenderToCacheFile" class="headerlink"><i class="fas fa-link"></i></a>
  365. </h4>
  366. <aside class="phpdocumentor-element-found-in">
  367. <abbr class="phpdocumentor-element-found-in__file" title="tests/QRCodeTest.php"><a href="files/tests-qrcodetest.html"><abbr title="tests/QRCodeTest.php">QRCodeTest.php</abbr></a></abbr>
  368. :
  369. <span class="phpdocumentor-element-found-in__line">78</span>
  370. </aside>
  371. <p class="phpdocumentor-summary">Tests if a cache file is properly saved in the given path</p>
  372. <code class="phpdocumentor-code phpdocumentor-signature ">
  373. <span class="phpdocumentor-signature__visibility">public</span>
  374. <span class="phpdocumentor-signature__name">testRenderToCacheFile</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  375. <div class="phpdocumentor-label-line">
  376. </div>
  377. </article>
  378. <article
  379. class="phpdocumentor-element
  380. -method
  381. -public
  382. "
  383. >
  384. <h4 class="phpdocumentor-element__name" id="method_testSaveException">
  385. testSaveException()
  386. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#method_testSaveException" class="headerlink"><i class="fas fa-link"></i></a>
  387. </h4>
  388. <aside class="phpdocumentor-element-found-in">
  389. <abbr class="phpdocumentor-element-found-in__file" title="tests/QRCodeTest.php"><a href="files/tests-qrcodetest.html"><abbr title="tests/QRCodeTest.php">QRCodeTest.php</abbr></a></abbr>
  390. :
  391. <span class="phpdocumentor-element-found-in__line">66</span>
  392. </aside>
  393. <p class="phpdocumentor-summary">Tests if an exception is thrown when trying to write a cache file to an invalid destination</p>
  394. <code class="phpdocumentor-code phpdocumentor-signature ">
  395. <span class="phpdocumentor-signature__visibility">public</span>
  396. <span class="phpdocumentor-signature__name">testSaveException</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  397. <div class="phpdocumentor-label-line">
  398. </div>
  399. </article>
  400. <article
  401. class="phpdocumentor-element
  402. -method
  403. -protected
  404. "
  405. >
  406. <h4 class="phpdocumentor-element__name" id="method_createBuildDir">
  407. createBuildDir()
  408. <a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_createBuildDir" class="headerlink"><i class="fas fa-link"></i></a>
  409. </h4>
  410. <aside class="phpdocumentor-element-found-in">
  411. <abbr class="phpdocumentor-element-found-in__file" title="tests/BuildDirTrait.php"><a href="files/tests-builddirtrait.html"><abbr title="tests/BuildDirTrait.php">BuildDirTrait.php</abbr></a></abbr>
  412. :
  413. <span class="phpdocumentor-element-found-in__line">35</span>
  414. </aside>
  415. <p class="phpdocumentor-summary">attempts to create the build dir</p>
  416. <code class="phpdocumentor-code phpdocumentor-signature ">
  417. <span class="phpdocumentor-signature__visibility">protected</span>
  418. <span class="phpdocumentor-signature__name">createBuildDir</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$subPath</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  419. <div class="phpdocumentor-label-line">
  420. </div>
  421. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  422. <dl class="phpdocumentor-argument-list">
  423. <dt class="phpdocumentor-argument-list__entry">
  424. <span class="phpdocumentor-signature__argument__name">$subPath</span>
  425. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  426. </dt>
  427. <dd class="phpdocumentor-argument-list__definition">
  428. </dd>
  429. </dl>
  430. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  431. Tags
  432. <a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_createBuildDir#tags" class="headerlink"><i class="fas fa-link"></i></a>
  433. </h5>
  434. <dl class="phpdocumentor-tag-list">
  435. <dt class="phpdocumentor-tag-list__entry">
  436. <span class="phpdocumentor-tag__name">throws</span>
  437. </dt>
  438. <dd class="phpdocumentor-tag-list__definition">
  439. <span class="phpdocumentor-tag-link"><abbr title="\RuntimeException">RuntimeException</abbr></span>
  440. </dd>
  441. </dl>
  442. </article>
  443. <article
  444. class="phpdocumentor-element
  445. -method
  446. -protected
  447. "
  448. >
  449. <h4 class="phpdocumentor-element__name" id="method_getBuildDir">
  450. getBuildDir()
  451. <a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_getBuildDir" class="headerlink"><i class="fas fa-link"></i></a>
  452. </h4>
  453. <aside class="phpdocumentor-element-found-in">
  454. <abbr class="phpdocumentor-element-found-in__file" title="tests/BuildDirTrait.php"><a href="files/tests-builddirtrait.html"><abbr title="tests/BuildDirTrait.php">BuildDirTrait.php</abbr></a></abbr>
  455. :
  456. <span class="phpdocumentor-element-found-in__line">53</span>
  457. </aside>
  458. <p class="phpdocumentor-summary">returns the full (real) path to the given build path</p>
  459. <code class="phpdocumentor-code phpdocumentor-signature ">
  460. <span class="phpdocumentor-signature__visibility">protected</span>
  461. <span class="phpdocumentor-signature__name">getBuildDir</span><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">$subPath</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">&#039;&#039;</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  462. <div class="phpdocumentor-label-line">
  463. </div>
  464. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  465. <dl class="phpdocumentor-argument-list">
  466. <dt class="phpdocumentor-argument-list__entry">
  467. <span class="phpdocumentor-signature__argument__name">$subPath</span>
  468. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  469. = <span class="phpdocumentor-signature__argument__default-value">&#039;&#039;</span> </dt>
  470. <dd class="phpdocumentor-argument-list__definition">
  471. </dd>
  472. </dl>
  473. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  474. Tags
  475. <a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_getBuildDir#tags" class="headerlink"><i class="fas fa-link"></i></a>
  476. </h5>
  477. <dl class="phpdocumentor-tag-list">
  478. <dt class="phpdocumentor-tag-list__entry">
  479. <span class="phpdocumentor-tag__name">throws</span>
  480. </dt>
  481. <dd class="phpdocumentor-tag-list__definition">
  482. <span class="phpdocumentor-tag-link"><abbr title="\RuntimeException">RuntimeException</abbr></span>
  483. </dd>
  484. </dl>
  485. <section>
  486. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  487. <span class="phpdocumentor-signature__response_type">string</span>
  488. </section>
  489. </article>
  490. <article
  491. class="phpdocumentor-element
  492. -method
  493. -protected
  494. "
  495. >
  496. <h4 class="phpdocumentor-element__name" id="method_getBuildFileContent">
  497. getBuildFileContent()
  498. <a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_getBuildFileContent" class="headerlink"><i class="fas fa-link"></i></a>
  499. </h4>
  500. <aside class="phpdocumentor-element-found-in">
  501. <abbr class="phpdocumentor-element-found-in__file" title="tests/BuildDirTrait.php"><a href="files/tests-builddirtrait.html"><abbr title="tests/BuildDirTrait.php">BuildDirTrait.php</abbr></a></abbr>
  502. :
  503. <span class="phpdocumentor-element-found-in__line">85</span>
  504. </aside>
  505. <p class="phpdocumentor-summary">returns the contents of the given build file</p>
  506. <code class="phpdocumentor-code phpdocumentor-signature ">
  507. <span class="phpdocumentor-signature__visibility">protected</span>
  508. <span class="phpdocumentor-signature__name">getBuildFileContent</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$fileSubPath</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  509. <div class="phpdocumentor-label-line">
  510. </div>
  511. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  512. <dl class="phpdocumentor-argument-list">
  513. <dt class="phpdocumentor-argument-list__entry">
  514. <span class="phpdocumentor-signature__argument__name">$fileSubPath</span>
  515. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  516. </dt>
  517. <dd class="phpdocumentor-argument-list__definition">
  518. </dd>
  519. </dl>
  520. <section>
  521. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  522. <span class="phpdocumentor-signature__response_type">string</span>
  523. </section>
  524. </article>
  525. <article
  526. class="phpdocumentor-element
  527. -method
  528. -protected
  529. "
  530. >
  531. <h4 class="phpdocumentor-element__name" id="method_getBuildFilePath">
  532. getBuildFilePath()
  533. <a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_getBuildFilePath" class="headerlink"><i class="fas fa-link"></i></a>
  534. </h4>
  535. <aside class="phpdocumentor-element-found-in">
  536. <abbr class="phpdocumentor-element-found-in__file" title="tests/BuildDirTrait.php"><a href="files/tests-builddirtrait.html"><abbr title="tests/BuildDirTrait.php">BuildDirTrait.php</abbr></a></abbr>
  537. :
  538. <span class="phpdocumentor-element-found-in__line">68</span>
  539. </aside>
  540. <p class="phpdocumentor-summary">returns the full (real) path to the given build file</p>
  541. <code class="phpdocumentor-code phpdocumentor-signature ">
  542. <span class="phpdocumentor-signature__visibility">protected</span>
  543. <span class="phpdocumentor-signature__name">getBuildFilePath</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$fileSubPath</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  544. <div class="phpdocumentor-label-line">
  545. </div>
  546. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  547. <dl class="phpdocumentor-argument-list">
  548. <dt class="phpdocumentor-argument-list__entry">
  549. <span class="phpdocumentor-signature__argument__name">$fileSubPath</span>
  550. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  551. </dt>
  552. <dd class="phpdocumentor-argument-list__definition">
  553. </dd>
  554. </dl>
  555. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  556. Tags
  557. <a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_getBuildFilePath#tags" class="headerlink"><i class="fas fa-link"></i></a>
  558. </h5>
  559. <dl class="phpdocumentor-tag-list">
  560. <dt class="phpdocumentor-tag-list__entry">
  561. <span class="phpdocumentor-tag__name">throws</span>
  562. </dt>
  563. <dd class="phpdocumentor-tag-list__definition">
  564. <span class="phpdocumentor-tag-link"><abbr title="\RuntimeException">RuntimeException</abbr></span>
  565. </dd>
  566. </dl>
  567. <section>
  568. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  569. <span class="phpdocumentor-signature__response_type">string</span>
  570. </section>
  571. </article>
  572. <article
  573. class="phpdocumentor-element
  574. -method
  575. -protected
  576. "
  577. >
  578. <h4 class="phpdocumentor-element__name" id="method_getBuildPath">
  579. getBuildPath()
  580. <a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_getBuildPath" class="headerlink"><i class="fas fa-link"></i></a>
  581. </h4>
  582. <aside class="phpdocumentor-element-found-in">
  583. <abbr class="phpdocumentor-element-found-in__file" title="tests/BuildDirTrait.php"><a href="files/tests-builddirtrait.html"><abbr title="tests/BuildDirTrait.php">BuildDirTrait.php</abbr></a></abbr>
  584. :
  585. <span class="phpdocumentor-element-found-in__line">26</span>
  586. </aside>
  587. <p class="phpdocumentor-summary">returns the full raw path to the build dir</p>
  588. <code class="phpdocumentor-code phpdocumentor-signature ">
  589. <span class="phpdocumentor-signature__visibility">protected</span>
  590. <span class="phpdocumentor-signature__name">getBuildPath</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$subPath</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
  591. <div class="phpdocumentor-label-line">
  592. </div>
  593. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  594. <dl class="phpdocumentor-argument-list">
  595. <dt class="phpdocumentor-argument-list__entry">
  596. <span class="phpdocumentor-signature__argument__name">$subPath</span>
  597. : <span class="phpdocumentor-signature__argument__return-type">string</span>
  598. </dt>
  599. <dd class="phpdocumentor-argument-list__definition">
  600. </dd>
  601. </dl>
  602. <section>
  603. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  604. <span class="phpdocumentor-signature__response_type">string</span>
  605. </section>
  606. </article>
  607. <article
  608. class="phpdocumentor-element
  609. -method
  610. -protected
  611. "
  612. >
  613. <h4 class="phpdocumentor-element__name" id="method_setUp">
  614. setUp()
  615. <a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#method_setUp" class="headerlink"><i class="fas fa-link"></i></a>
  616. </h4>
  617. <aside class="phpdocumentor-element-found-in">
  618. <abbr class="phpdocumentor-element-found-in__file" title="tests/QRCodeTest.php"><a href="files/tests-qrcodetest.html"><abbr title="tests/QRCodeTest.php">QRCodeTest.php</abbr></a></abbr>
  619. :
  620. <span class="phpdocumentor-element-found-in__line">32</span>
  621. </aside>
  622. <p class="phpdocumentor-summary">invoke test instances</p>
  623. <code class="phpdocumentor-code phpdocumentor-signature ">
  624. <span class="phpdocumentor-signature__visibility">protected</span>
  625. <span class="phpdocumentor-signature__name">setUp</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  626. <div class="phpdocumentor-label-line">
  627. </div>
  628. </article>
  629. </section>
  630. <div class="phpdocumentor-modal" id="source-view">
  631. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  632. <div class="phpdocumentor-modal-container">
  633. <div class="phpdocumentor-modal-content">
  634. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/tests/QRCodeTest.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  635. </div>
  636. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  637. </div>
  638. </div>
  639. <script type="text/javascript">
  640. (function () {
  641. function loadExternalCodeSnippet(el, url, line) {
  642. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  643. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  644. const language = 'php';
  645. const code = document.createElement('code');
  646. code.className = 'language-' + language;
  647. pre.textContent = '';
  648. pre.setAttribute('data-line', line)
  649. code.textContent = 'Loading…';
  650. pre.appendChild(code);
  651. var xhr = new XMLHttpRequest();
  652. xhr.open('GET', src, true);
  653. xhr.onreadystatechange = function () {
  654. if (xhr.readyState !== 4) {
  655. return;
  656. }
  657. if (xhr.status < 400 && xhr.responseText) {
  658. code.textContent = xhr.responseText;
  659. Prism.highlightElement(code);
  660. return;
  661. }
  662. if (xhr.status === 404) {
  663. code.textContent = '✖ Error: File could not be found';
  664. return;
  665. }
  666. if (xhr.status >= 400) {
  667. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  668. return;
  669. }
  670. code.textContent = '✖ Error: An unknown error occurred';
  671. };
  672. xhr.send(null);
  673. });
  674. }
  675. const modalButtons = document.querySelectorAll("[data-modal]");
  676. const openedAsLocalFile = window.location.protocol === 'file:';
  677. if (modalButtons.length > 0 && openedAsLocalFile) {
  678. console.warn(
  679. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  680. 'browsers block XHR requests when a page is opened this way'
  681. );
  682. }
  683. modalButtons.forEach(function (trigger) {
  684. if (openedAsLocalFile) {
  685. trigger.setAttribute("hidden", "hidden");
  686. }
  687. trigger.addEventListener("click", function (event) {
  688. event.preventDefault();
  689. const modal = document.getElementById(trigger.dataset.modal);
  690. if (!modal) {
  691. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  692. return;
  693. }
  694. modal.classList.add("phpdocumentor-modal__open");
  695. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  696. const exits = modal.querySelectorAll("[data-exit-button]");
  697. exits.forEach(function (exit) {
  698. exit.addEventListener("click", function (event) {
  699. event.preventDefault();
  700. modal.classList.remove("phpdocumentor-modal__open");
  701. });
  702. });
  703. });
  704. });
  705. })();
  706. </script>
  707. </article>
  708. </section>
  709. <section class="phpdocumentor-on-this-page__sidebar">
  710. <section class="phpdocumentor-on-this-page__content">
  711. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  712. <ul class="phpdocumentor-list -clean">
  713. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  714. <li>
  715. <ul class="phpdocumentor-list -clean">
  716. <li><a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#toc-constants">Constants</a></li>
  717. <li><a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#toc-properties">Properties</a></li>
  718. <li><a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#toc-methods">Methods</a></li>
  719. </ul>
  720. </li>
  721. <li class="phpdocumentor-on-this-page-section__title">Constants</li>
  722. <li>
  723. <ul class="phpdocumentor-list -clean">
  724. <li><a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#constant_buildDir">buildDir</a></li>
  725. </ul>
  726. </li>
  727. <li class="phpdocumentor-on-this-page-section__title">Properties</li>
  728. <li>
  729. <ul class="phpdocumentor-list -clean">
  730. <li><a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#property_options">$options<a href="classes/chillerlan-QRCodeTest-QRCodeTest.html"></li>
  731. <li><a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#property_qrcode">$qrcode<a href="classes/chillerlan-QRCodeTest-QRCodeTest.html"></li>
  732. </ul>
  733. </li>
  734. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  735. <li>
  736. <ul class="phpdocumentor-list -clean">
  737. <li><a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#method_testInitCustomOutputInterfaceNotExistsException">testInitCustomOutputInterfaceNotExistsException()</a></li>
  738. <li><a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#method_testInitCustomOutputInterfaceNotImplementsException">testInitCustomOutputInterfaceNotImplementsException()</a></li>
  739. <li><a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#method_testRenderToCacheFile">testRenderToCacheFile()</a></li>
  740. <li><a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#method_testSaveException">testSaveException()</a></li>
  741. <li><a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_createBuildDir">createBuildDir()</a></li>
  742. <li><a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_getBuildDir">getBuildDir()</a></li>
  743. <li><a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_getBuildFileContent">getBuildFileContent()</a></li>
  744. <li><a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_getBuildFilePath">getBuildFilePath()</a></li>
  745. <li><a href="classes/chillerlan-QRCodeTest-BuildDirTrait.html#method_getBuildPath">getBuildPath()</a></li>
  746. <li><a href="classes/chillerlan-QRCodeTest-QRCodeTest.html#method_setUp">setUp()</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-QRCodeTest.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>