TestGuy.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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. // @codingStandardsIgnoreFile
  5. use Codeception\Maybe;
  6. use Codeception\Module\Filesystem;
  7. use Codeception\Module\TestHelper;
  8. /**
  9. * Inherited methods
  10. * @method void wantToTest($text)
  11. * @method void wantTo($text)
  12. * @method void amTesting($method)
  13. * @method void amTestingMethod($method)
  14. * @method void testMethod($signature)
  15. * @method void expectTo($prediction)
  16. * @method void expect($prediction)
  17. * @method void amGoingTo($argumentation)
  18. * @method void am($role)
  19. * @method void lookForwardTo($role)
  20. */
  21. class TestGuy extends \Codeception\AbstractGuy
  22. {
  23. /**
  24. * Enters a directory In local filesystem.
  25. * Project root directory is used by default
  26. *
  27. * @param $path
  28. * @see Filesystem::amInPath()
  29. * @return \Codeception\Maybe
  30. * ! This method is generated. DO NOT EDIT. !
  31. * ! Documentation taken from corresponding module !
  32. */
  33. public function amInPath($path) {
  34. $this->scenario->condition('amInPath', func_get_args());
  35. if ($this->scenario->running()) {
  36. $result = $this->scenario->runStep();
  37. return new Maybe($result);
  38. }
  39. return new Maybe();
  40. }
  41. /**
  42. * Opens a file and stores it's content.
  43. *
  44. * Usage:
  45. *
  46. * ``` php
  47. * <?php
  48. * $I->openFile('composer.json');
  49. * $I->seeInThisFile('codeception/codeception');
  50. * ?>
  51. * ```
  52. *
  53. * @param $filename
  54. * @see Filesystem::openFile()
  55. * @return \Codeception\Maybe
  56. * ! This method is generated. DO NOT EDIT. !
  57. * ! Documentation taken from corresponding module !
  58. */
  59. public function openFile($filename) {
  60. $this->scenario->action('openFile', func_get_args());
  61. if ($this->scenario->running()) {
  62. $result = $this->scenario->runStep();
  63. return new Maybe($result);
  64. }
  65. return new Maybe();
  66. }
  67. /**
  68. * Deletes a file
  69. *
  70. * ``` php
  71. * <?php
  72. * $I->deleteFile('composer.lock');
  73. * ?>
  74. * ```
  75. *
  76. * @param $filename
  77. * @see Filesystem::deleteFile()
  78. * @return \Codeception\Maybe
  79. * ! This method is generated. DO NOT EDIT. !
  80. * ! Documentation taken from corresponding module !
  81. */
  82. public function deleteFile($filename) {
  83. $this->scenario->action('deleteFile', func_get_args());
  84. if ($this->scenario->running()) {
  85. $result = $this->scenario->runStep();
  86. return new Maybe($result);
  87. }
  88. return new Maybe();
  89. }
  90. /**
  91. * Deletes directory with all subdirectories
  92. *
  93. * ``` php
  94. * <?php
  95. * $I->deleteDir('vendor');
  96. * ?>
  97. * ```
  98. *
  99. * @param $dirname
  100. * @see Filesystem::deleteDir()
  101. * @return \Codeception\Maybe
  102. * ! This method is generated. DO NOT EDIT. !
  103. * ! Documentation taken from corresponding module !
  104. */
  105. public function deleteDir($dirname) {
  106. $this->scenario->action('deleteDir', func_get_args());
  107. if ($this->scenario->running()) {
  108. $result = $this->scenario->runStep();
  109. return new Maybe($result);
  110. }
  111. return new Maybe();
  112. }
  113. /**
  114. * Copies directory with all contents
  115. *
  116. * ``` php
  117. * <?php
  118. * $I->copyDir('vendor','old_vendor');
  119. * ?>
  120. * ```
  121. *
  122. * @param $src
  123. * @param $dst
  124. * @see Filesystem::copyDir()
  125. * @return \Codeception\Maybe
  126. * ! This method is generated. DO NOT EDIT. !
  127. * ! Documentation taken from corresponding module !
  128. */
  129. public function copyDir($src, $dst) {
  130. $this->scenario->action('copyDir', func_get_args());
  131. if ($this->scenario->running()) {
  132. $result = $this->scenario->runStep();
  133. return new Maybe($result);
  134. }
  135. return new Maybe();
  136. }
  137. /**
  138. * Checks If opened file has `text` in it.
  139. *
  140. * Usage:
  141. *
  142. * ``` php
  143. * <?php
  144. * $I->openFile('composer.json');
  145. * $I->seeInThisFile('codeception/codeception');
  146. * ?>
  147. * ```
  148. *
  149. * @param $text
  150. * @see Filesystem::seeInThisFile()
  151. * @return \Codeception\Maybe
  152. * ! This method is generated. DO NOT EDIT. !
  153. * ! Documentation taken from corresponding module !
  154. */
  155. public function seeInThisFile($text) {
  156. $this->scenario->assertion('seeInThisFile', func_get_args());
  157. if ($this->scenario->running()) {
  158. $result = $this->scenario->runStep();
  159. return new Maybe($result);
  160. }
  161. return new Maybe();
  162. }
  163. /**
  164. * Checks If opened file doesn't contain `text` in it
  165. *
  166. * ``` php
  167. * <?php
  168. * $I->openFile('composer.json');
  169. * $I->seeInThisFile('codeception/codeception');
  170. * ?>
  171. * ```
  172. *
  173. * @param $text
  174. * @see Filesystem::dontSeeInThisFile()
  175. * @return \Codeception\Maybe
  176. * ! This method is generated. DO NOT EDIT. !
  177. * ! Documentation taken from corresponding module !
  178. */
  179. public function dontSeeInThisFile($text) {
  180. $this->scenario->action('dontSeeInThisFile', func_get_args());
  181. if ($this->scenario->running()) {
  182. $result = $this->scenario->runStep();
  183. return new Maybe($result);
  184. }
  185. return new Maybe();
  186. }
  187. /**
  188. * Deletes a file
  189. * @see Filesystem::deleteThisFile()
  190. * @return \Codeception\Maybe
  191. * ! This method is generated. DO NOT EDIT. !
  192. * ! Documentation taken from corresponding module !
  193. */
  194. public function deleteThisFile() {
  195. $this->scenario->action('deleteThisFile', func_get_args());
  196. if ($this->scenario->running()) {
  197. $result = $this->scenario->runStep();
  198. return new Maybe($result);
  199. }
  200. return new Maybe();
  201. }
  202. /**
  203. * Checks if file exists in path.
  204. * Opens a file when it's exists
  205. *
  206. * ``` php
  207. * <?php
  208. * $I->seeFileFound('UserModel.php','app/models');
  209. * ?>
  210. * ```
  211. *
  212. * @param $filename
  213. * @param string $path
  214. * @see Filesystem::seeFileFound()
  215. * @return \Codeception\Maybe
  216. * ! This method is generated. DO NOT EDIT. !
  217. * ! Documentation taken from corresponding module !
  218. */
  219. public function seeFileFound($filename, $path = null) {
  220. $this->scenario->assertion('seeFileFound', func_get_args());
  221. if ($this->scenario->running()) {
  222. $result = $this->scenario->runStep();
  223. return new Maybe($result);
  224. }
  225. return new Maybe();
  226. }
  227. }