PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/tests/coverage/CoverGuy.php

https://github.com/instalic/Codeception
PHP | 324 lines | 113 code | 29 blank | 182 comment | 13 complexity | 928e9df7b96651982e0b79430d52bbcd MD5 | raw file
  1. <?php
  2. // This class was automatically generated by build task
  3. // You can change it manually, but it will be overwritten on next build
  4. use Codeception\Maybe;
  5. use Codeception\Module\Filesystem;
  6. use Codeception\Module\Cli;
  7. use Codeception\Module\CliHelper;
  8. use Codeception\Module\CoverHelper;
  9. /**
  10. * Inherited methods
  11. * @method void wantToTest($text)
  12. * @method void wantTo($text)
  13. * @method void amTesting($method)
  14. * @method void amTestingMethod($method)
  15. * @method void testMethod($signature)
  16. * @method void expectTo($prediction)
  17. * @method void expect($prediction)
  18. * @method void amGoingTo($argumentation)
  19. * @method void am($role)
  20. * @method void lookForwardTo($role)
  21. */
  22. class CoverGuy extends \Codeception\AbstractGuy
  23. {
  24. /**
  25. * Enters a directory In local filesystem.
  26. * Project root directory is used by default
  27. *
  28. * @param $path
  29. * @see Filesystem::amInPath()
  30. *
  31. * ! This method is generated. DO NOT EDIT. !
  32. * ! Documentation taken from corresponding module !
  33. */
  34. public function amInPath($path) {
  35. $this->scenario->condition('amInPath', func_get_args());
  36. if ($this->scenario->running()) {
  37. $result = $this->scenario->runStep();
  38. return new Maybe($result);
  39. }
  40. return new Maybe();
  41. }
  42. /**
  43. * Opens a file and stores it's content.
  44. *
  45. * Usage:
  46. *
  47. * ``` php
  48. * <?php
  49. * $I->openFile('composer.json');
  50. * $I->seeInThisFile('codeception/codeception');
  51. * ?>
  52. * ```
  53. *
  54. * @param $filename
  55. * @see Filesystem::openFile()
  56. *
  57. * ! This method is generated. DO NOT EDIT. !
  58. * ! Documentation taken from corresponding module !
  59. */
  60. public function openFile($filename) {
  61. $this->scenario->action('openFile', func_get_args());
  62. if ($this->scenario->running()) {
  63. $result = $this->scenario->runStep();
  64. return new Maybe($result);
  65. }
  66. return new Maybe();
  67. }
  68. /**
  69. * Deletes a file
  70. *
  71. * ``` php
  72. * <?php
  73. * $I->deleteFile('composer.lock');
  74. * ?>
  75. * ```
  76. *
  77. * @param $filename
  78. * @see Filesystem::deleteFile()
  79. *
  80. * ! This method is generated. DO NOT EDIT. !
  81. * ! Documentation taken from corresponding module !
  82. */
  83. public function deleteFile($filename) {
  84. $this->scenario->action('deleteFile', func_get_args());
  85. if ($this->scenario->running()) {
  86. $result = $this->scenario->runStep();
  87. return new Maybe($result);
  88. }
  89. return new Maybe();
  90. }
  91. /**
  92. * Deletes directory with all subdirectories
  93. *
  94. * ``` php
  95. * <?php
  96. * $I->deleteDir('vendor');
  97. * ?>
  98. * ```
  99. *
  100. * @param $dirname
  101. * @see Filesystem::deleteDir()
  102. *
  103. * ! This method is generated. DO NOT EDIT. !
  104. * ! Documentation taken from corresponding module !
  105. */
  106. public function deleteDir($dirname) {
  107. $this->scenario->action('deleteDir', func_get_args());
  108. if ($this->scenario->running()) {
  109. $result = $this->scenario->runStep();
  110. return new Maybe($result);
  111. }
  112. return new Maybe();
  113. }
  114. /**
  115. * Copies directory with all contents
  116. *
  117. * ``` php
  118. * <?php
  119. * $I->copyDir('vendor','old_vendor');
  120. * ?>
  121. * ```
  122. *
  123. * @param $src
  124. * @param $dst
  125. * @see Filesystem::copyDir()
  126. *
  127. * ! This method is generated. DO NOT EDIT. !
  128. * ! Documentation taken from corresponding module !
  129. */
  130. public function copyDir($src, $dst) {
  131. $this->scenario->action('copyDir', func_get_args());
  132. if ($this->scenario->running()) {
  133. $result = $this->scenario->runStep();
  134. return new Maybe($result);
  135. }
  136. return new Maybe();
  137. }
  138. /**
  139. * Checks If opened file has `text` in it.
  140. *
  141. * Usage:
  142. *
  143. * ``` php
  144. * <?php
  145. * $I->openFile('composer.json');
  146. * $I->seeInThisFile('codeception/codeception');
  147. * ?>
  148. * ```
  149. *
  150. * @param $text
  151. * @see Filesystem::seeInThisFile()
  152. *
  153. * ! This method is generated. DO NOT EDIT. !
  154. * ! Documentation taken from corresponding module !
  155. */
  156. public function seeInThisFile($text) {
  157. $this->scenario->assertion('seeInThisFile', func_get_args());
  158. if ($this->scenario->running()) {
  159. $result = $this->scenario->runStep();
  160. return new Maybe($result);
  161. }
  162. return new Maybe();
  163. }
  164. /**
  165. * Checks If opened file doesn't contain `text` in it
  166. *
  167. * ``` php
  168. * <?php
  169. * $I->openFile('composer.json');
  170. * $I->seeInThisFile('codeception/codeception');
  171. * ?>
  172. * ```
  173. *
  174. * @param $text
  175. * @see Filesystem::dontSeeInThisFile()
  176. *
  177. * ! This method is generated. DO NOT EDIT. !
  178. * ! Documentation taken from corresponding module !
  179. */
  180. public function dontSeeInThisFile($text) {
  181. $this->scenario->action('dontSeeInThisFile', func_get_args());
  182. if ($this->scenario->running()) {
  183. $result = $this->scenario->runStep();
  184. return new Maybe($result);
  185. }
  186. return new Maybe();
  187. }
  188. /**
  189. * Deletes a file
  190. * @see Filesystem::deleteThisFile()
  191. *
  192. * ! This method is generated. DO NOT EDIT. !
  193. * ! Documentation taken from corresponding module !
  194. */
  195. public function deleteThisFile() {
  196. $this->scenario->action('deleteThisFile', func_get_args());
  197. if ($this->scenario->running()) {
  198. $result = $this->scenario->runStep();
  199. return new Maybe($result);
  200. }
  201. return new Maybe();
  202. }
  203. /**
  204. * Checks if file exists in path.
  205. * Opens a file when it's exists
  206. *
  207. * ``` php
  208. * <?php
  209. * $I->seeFileFound('UserModel.php','app/models');
  210. * ?>
  211. * ```
  212. *
  213. * @param $filename
  214. * @param string $path
  215. * @see Filesystem::seeFileFound()
  216. *
  217. * ! This method is generated. DO NOT EDIT. !
  218. * ! Documentation taken from corresponding module !
  219. */
  220. public function seeFileFound($filename, $path = null) {
  221. $this->scenario->assertion('seeFileFound', func_get_args());
  222. if ($this->scenario->running()) {
  223. $result = $this->scenario->runStep();
  224. return new Maybe($result);
  225. }
  226. return new Maybe();
  227. }
  228. /**
  229. * Executes a shell command
  230. *
  231. * @param $command
  232. * @see Cli::runShellCommmand()
  233. *
  234. * ! This method is generated. DO NOT EDIT. !
  235. * ! Documentation taken from corresponding module !
  236. */
  237. public function runShellCommmand($command) {
  238. $this->scenario->action('runShellCommmand', func_get_args());
  239. if ($this->scenario->running()) {
  240. $result = $this->scenario->runStep();
  241. return new Maybe($result);
  242. }
  243. return new Maybe();
  244. }
  245. /**
  246. * Checks that output from last executed command contains text
  247. *
  248. * @param $text
  249. * @see Cli::seeInShellOutput()
  250. *
  251. * ! This method is generated. DO NOT EDIT. !
  252. * ! Documentation taken from corresponding module !
  253. */
  254. public function seeInShellOutput($text) {
  255. $this->scenario->assertion('seeInShellOutput', func_get_args());
  256. if ($this->scenario->running()) {
  257. $result = $this->scenario->runStep();
  258. return new Maybe($result);
  259. }
  260. return new Maybe();
  261. }
  262. /**
  263. * Checks that output from latest command doesn't contain text
  264. *
  265. * @param $text
  266. *
  267. * @see Cli::dontSeeInShellOutput()
  268. *
  269. * ! This method is generated. DO NOT EDIT. !
  270. * ! Documentation taken from corresponding module !
  271. */
  272. public function dontSeeInShellOutput($text) {
  273. $this->scenario->action('dontSeeInShellOutput', func_get_args());
  274. if ($this->scenario->running()) {
  275. $result = $this->scenario->runStep();
  276. return new Maybe($result);
  277. }
  278. return new Maybe();
  279. }
  280. /**
  281. *
  282. * @see CliHelper::executeCommand()
  283. *
  284. * ! This method is generated. DO NOT EDIT. !
  285. * ! Documentation taken from corresponding module !
  286. */
  287. public function executeCommand($command) {
  288. $this->scenario->action('executeCommand', func_get_args());
  289. if ($this->scenario->running()) {
  290. $result = $this->scenario->runStep();
  291. return new Maybe($result);
  292. }
  293. return new Maybe();
  294. }
  295. }