PageRenderTime 62ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/data/claypit/tests/remote/OtherGuy.php

https://github.com/instalic/Codeception
PHP | 837 lines | 280 code | 71 blank | 486 comment | 34 complexity | 3f34558d679a0ade24ef61b462519184 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\PhpBrowser;
  6. use Codeception\Module\Filesystem;
  7. use Codeception\Module\OtherHelper;
  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 OtherGuy extends \Codeception\AbstractGuy
  22. {
  23. /**
  24. * Submits a form located on page.
  25. * Specify the form by it's css or xpath selector.
  26. * Fill the form fields values as array.
  27. *
  28. * Skipped fields will be filled by their values from page.
  29. * You don't need to click the 'Submit' button afterwards.
  30. * This command itself triggers the request to form's action.
  31. *
  32. * Examples:
  33. *
  34. * ``` php
  35. * <?php
  36. * $I->submitForm('#login', array('login' => 'davert', 'password' => '123456'));
  37. *
  38. * ```
  39. *
  40. * For sample Sign Up form:
  41. *
  42. * ``` html
  43. * <form action="/sign_up">
  44. * Login: <input type="text" name="user[login]" /><br/>
  45. * Password: <input type="password" name="user[password]" /><br/>
  46. * Do you agree to out terms? <input type="checkbox" name="user[agree]" /><br/>
  47. * Select pricing plan <select name="plan"><option value="1">Free</option><option value="2" selected="selected">Paid</option></select>
  48. * <input type="submit" value="Submit" />
  49. * </form>
  50. * ```
  51. * I can write this:
  52. *
  53. * ``` php
  54. * <?php
  55. * $I->submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true)));
  56. *
  57. * ```
  58. * Note, that pricing plan will be set to Paid, as it's selected on page.
  59. *
  60. * @param $selector
  61. * @param $params
  62. * @see PhpBrowser::submitForm()
  63. *
  64. * ! This method is generated. DO NOT EDIT. !
  65. * ! Documentation taken from corresponding module !
  66. */
  67. public function submitForm($selector, $params) {
  68. $this->scenario->action('submitForm', func_get_args());
  69. if ($this->scenario->running()) {
  70. $result = $this->scenario->runStep();
  71. return new Maybe($result);
  72. }
  73. return new Maybe();
  74. }
  75. /**
  76. * If your page triggers an ajax request, you can perform it manually.
  77. * This action sends a POST ajax request with specified params.
  78. * Additional params can be passed as array.
  79. *
  80. * Example:
  81. *
  82. * Imagine that by clicking checkbox you trigger ajax request which updates user settings.
  83. * We emulate that click by running this ajax request manually.
  84. *
  85. * ``` php
  86. * <?php
  87. * $I->sendAjaxPostRequest('/updateSettings', array('notifications' => true); // POST
  88. * $I->sendAjaxGetRequest('/updateSettings', array('notifications' => true); // GET
  89. *
  90. * ```
  91. *
  92. * @param $uri
  93. * @param $params
  94. * @see PhpBrowser::sendAjaxPostRequest()
  95. *
  96. * ! This method is generated. DO NOT EDIT. !
  97. * ! Documentation taken from corresponding module !
  98. */
  99. public function sendAjaxPostRequest($uri, $params = null) {
  100. $this->scenario->action('sendAjaxPostRequest', func_get_args());
  101. if ($this->scenario->running()) {
  102. $result = $this->scenario->runStep();
  103. return new Maybe($result);
  104. }
  105. return new Maybe();
  106. }
  107. /**
  108. * If your page triggers an ajax request, you can perform it manually.
  109. * This action sends a GET ajax request with specified params.
  110. *
  111. * See ->sendAjaxPostRequest for examples.
  112. *
  113. * @param $uri
  114. * @param $params
  115. * @see PhpBrowser::sendAjaxGetRequest()
  116. *
  117. * ! This method is generated. DO NOT EDIT. !
  118. * ! Documentation taken from corresponding module !
  119. */
  120. public function sendAjaxGetRequest($uri, $params = null) {
  121. $this->scenario->action('sendAjaxGetRequest', func_get_args());
  122. if ($this->scenario->running()) {
  123. $result = $this->scenario->runStep();
  124. return new Maybe($result);
  125. }
  126. return new Maybe();
  127. }
  128. /**
  129. * Opens the page.
  130. *
  131. * @param $page
  132. * @see PhpBrowser::amOnPage()
  133. *
  134. * ! This method is generated. DO NOT EDIT. !
  135. * ! Documentation taken from corresponding module !
  136. */
  137. public function amOnPage($page) {
  138. $this->scenario->condition('amOnPage', func_get_args());
  139. if ($this->scenario->running()) {
  140. $result = $this->scenario->runStep();
  141. return new Maybe($result);
  142. }
  143. return new Maybe();
  144. }
  145. /**
  146. * Check if current page doesn't contain the text specified.
  147. * Specify the css selector to match only specific region.
  148. *
  149. * Examples:
  150. *
  151. * ```php
  152. * <?php
  153. * $I->dontSee('Login'); // I can suppose user is already logged in
  154. * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
  155. * $I->dontSee('Sign Up','//body/h1'); // with XPath
  156. * ```
  157. *
  158. * @param $text
  159. * @param null $selector
  160. * @see PhpBrowser::dontSee()
  161. *
  162. * ! This method is generated. DO NOT EDIT. !
  163. * ! Documentation taken from corresponding module !
  164. */
  165. public function dontSee($text, $selector = null) {
  166. $this->scenario->action('dontSee', func_get_args());
  167. if ($this->scenario->running()) {
  168. $result = $this->scenario->runStep();
  169. return new Maybe($result);
  170. }
  171. return new Maybe();
  172. }
  173. /**
  174. * Check if current page contains the text specified.
  175. * Specify the css selector to match only specific region.
  176. *
  177. * Examples:
  178. *
  179. * ``` php
  180. * <?php
  181. * $I->see('Logout'); // I can suppose user is logged in
  182. * $I->see('Sign Up','h1'); // I can suppose it's a signup page
  183. * $I->see('Sign Up','//body/h1'); // with XPath
  184. *
  185. * ```
  186. *
  187. * @param $text
  188. * @param null $selector
  189. * @see PhpBrowser::see()
  190. *
  191. * ! This method is generated. DO NOT EDIT. !
  192. * ! Documentation taken from corresponding module !
  193. */
  194. public function see($text, $selector = null) {
  195. $this->scenario->assertion('see', 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 the document has link that contains specified
  204. * text (or text and url)
  205. *
  206. * @param string $text
  207. * @param string $url (Default: null)
  208. * @return mixed
  209. * @see PhpBrowser::seeLink()
  210. *
  211. * ! This method is generated. DO NOT EDIT. !
  212. * ! Documentation taken from corresponding module !
  213. */
  214. public function seeLink($text, $url = null) {
  215. $this->scenario->assertion('seeLink', func_get_args());
  216. if ($this->scenario->running()) {
  217. $result = $this->scenario->runStep();
  218. return new Maybe($result);
  219. }
  220. return new Maybe();
  221. }
  222. /**
  223. * Checks if the document hasn't link that contains specified
  224. * text (or text and url)
  225. *
  226. * @param string $text
  227. * @param string $url (Default: null)
  228. * @return mixed
  229. * @see PhpBrowser::dontSeeLink()
  230. *
  231. * ! This method is generated. DO NOT EDIT. !
  232. * ! Documentation taken from corresponding module !
  233. */
  234. public function dontSeeLink($text, $url = null) {
  235. $this->scenario->action('dontSeeLink', func_get_args());
  236. if ($this->scenario->running()) {
  237. $result = $this->scenario->runStep();
  238. return new Maybe($result);
  239. }
  240. return new Maybe();
  241. }
  242. /**
  243. * Clicks on either link or button (for PHPBrowser) or on any selector for JS browsers.
  244. * Link text or css selector can be passed.
  245. *
  246. * @param $link
  247. * @see PhpBrowser::click()
  248. *
  249. * ! This method is generated. DO NOT EDIT. !
  250. * ! Documentation taken from corresponding module !
  251. */
  252. public function click($link) {
  253. $this->scenario->action('click', func_get_args());
  254. if ($this->scenario->running()) {
  255. $result = $this->scenario->runStep();
  256. return new Maybe($result);
  257. }
  258. return new Maybe();
  259. }
  260. /**
  261. * Reloads current page
  262. * @see PhpBrowser::reloadPage()
  263. *
  264. * ! This method is generated. DO NOT EDIT. !
  265. * ! Documentation taken from corresponding module !
  266. */
  267. public function reloadPage() {
  268. $this->scenario->action('reloadPage', func_get_args());
  269. if ($this->scenario->running()) {
  270. $result = $this->scenario->runStep();
  271. return new Maybe($result);
  272. }
  273. return new Maybe();
  274. }
  275. /**
  276. * Moves back in history
  277. * @see PhpBrowser::moveBack()
  278. *
  279. * ! This method is generated. DO NOT EDIT. !
  280. * ! Documentation taken from corresponding module !
  281. */
  282. public function moveBack() {
  283. $this->scenario->action('moveBack', func_get_args());
  284. if ($this->scenario->running()) {
  285. $result = $this->scenario->runStep();
  286. return new Maybe($result);
  287. }
  288. return new Maybe();
  289. }
  290. /**
  291. * Moves forward in history
  292. * @see PhpBrowser::moveForward()
  293. *
  294. * ! This method is generated. DO NOT EDIT. !
  295. * ! Documentation taken from corresponding module !
  296. */
  297. public function moveForward() {
  298. $this->scenario->action('moveForward', func_get_args());
  299. if ($this->scenario->running()) {
  300. $result = $this->scenario->runStep();
  301. return new Maybe($result);
  302. }
  303. return new Maybe();
  304. }
  305. /**
  306. * Fill the field with given value.
  307. * Field is searched by its id|name|label|value or CSS selector.
  308. *
  309. * @param $field
  310. * @param $value
  311. * @see PhpBrowser::fillField()
  312. *
  313. * ! This method is generated. DO NOT EDIT. !
  314. * ! Documentation taken from corresponding module !
  315. */
  316. public function fillField($field, $value) {
  317. $this->scenario->action('fillField', func_get_args());
  318. if ($this->scenario->running()) {
  319. $result = $this->scenario->runStep();
  320. return new Maybe($result);
  321. }
  322. return new Maybe();
  323. }
  324. /**
  325. * Selects opition from selectbox.
  326. * Use field name|label|value|id or CSS selector to match selectbox.
  327. * Either values or text of options can be used to fetch option.
  328. *
  329. * @param $select
  330. * @param $option
  331. * @see PhpBrowser::selectOption()
  332. *
  333. * ! This method is generated. DO NOT EDIT. !
  334. * ! Documentation taken from corresponding module !
  335. */
  336. public function selectOption($select, $option) {
  337. $this->scenario->action('selectOption', func_get_args());
  338. if ($this->scenario->running()) {
  339. $result = $this->scenario->runStep();
  340. return new Maybe($result);
  341. }
  342. return new Maybe();
  343. }
  344. /**
  345. * Check matched checkbox or radiobutton.
  346. * Field is searched by its id|name|label|value or CSS selector.
  347. *
  348. * @param $option
  349. * @see PhpBrowser::checkOption()
  350. *
  351. * ! This method is generated. DO NOT EDIT. !
  352. * ! Documentation taken from corresponding module !
  353. */
  354. public function checkOption($option) {
  355. $this->scenario->action('checkOption', func_get_args());
  356. if ($this->scenario->running()) {
  357. $result = $this->scenario->runStep();
  358. return new Maybe($result);
  359. }
  360. return new Maybe();
  361. }
  362. /**
  363. * Uncheck matched checkbox or radiobutton.
  364. * Field is searched by its id|name|label|value or CSS selector.
  365. *
  366. * @param $option
  367. * @see PhpBrowser::uncheckOption()
  368. *
  369. * ! This method is generated. DO NOT EDIT. !
  370. * ! Documentation taken from corresponding module !
  371. */
  372. public function uncheckOption($option) {
  373. $this->scenario->action('uncheckOption', func_get_args());
  374. if ($this->scenario->running()) {
  375. $result = $this->scenario->runStep();
  376. return new Maybe($result);
  377. }
  378. return new Maybe();
  379. }
  380. /**
  381. * Checks if current url contains the $uri.
  382. *
  383. * @param $uri
  384. * @see PhpBrowser::seeInCurrentUrl()
  385. *
  386. * ! This method is generated. DO NOT EDIT. !
  387. * ! Documentation taken from corresponding module !
  388. */
  389. public function seeInCurrentUrl($uri) {
  390. $this->scenario->assertion('seeInCurrentUrl', func_get_args());
  391. if ($this->scenario->running()) {
  392. $result = $this->scenario->runStep();
  393. return new Maybe($result);
  394. }
  395. return new Maybe();
  396. }
  397. /**
  398. * Attaches file stored in Codeception data directory to field specified.
  399. * Field is searched by its id|name|label|value or CSS selector.
  400. *
  401. * @param $field
  402. * @param $filename
  403. * @see PhpBrowser::attachFile()
  404. *
  405. * ! This method is generated. DO NOT EDIT. !
  406. * ! Documentation taken from corresponding module !
  407. */
  408. public function attachFile($field, $filename) {
  409. $this->scenario->action('attachFile', func_get_args());
  410. if ($this->scenario->running()) {
  411. $result = $this->scenario->runStep();
  412. return new Maybe($result);
  413. }
  414. return new Maybe();
  415. }
  416. /**
  417. * Asserts the checkbox is checked.
  418. * Field is searched by its id|name|label|value or CSS selector.
  419. *
  420. * @param $checkbox
  421. * @see PhpBrowser::seeCheckboxIsChecked()
  422. *
  423. * ! This method is generated. DO NOT EDIT. !
  424. * ! Documentation taken from corresponding module !
  425. */
  426. public function seeCheckboxIsChecked($checkbox) {
  427. $this->scenario->assertion('seeCheckboxIsChecked', func_get_args());
  428. if ($this->scenario->running()) {
  429. $result = $this->scenario->runStep();
  430. return new Maybe($result);
  431. }
  432. return new Maybe();
  433. }
  434. /**
  435. * Asserts that checbox is not checked
  436. * Field is searched by its id|name|label|value or CSS selector.
  437. *
  438. * @param $checkbox
  439. * @see PhpBrowser::dontSeeCheckboxIsChecked()
  440. *
  441. * ! This method is generated. DO NOT EDIT. !
  442. * ! Documentation taken from corresponding module !
  443. */
  444. public function dontSeeCheckboxIsChecked($checkbox) {
  445. $this->scenario->action('dontSeeCheckboxIsChecked', func_get_args());
  446. if ($this->scenario->running()) {
  447. $result = $this->scenario->runStep();
  448. return new Maybe($result);
  449. }
  450. return new Maybe();
  451. }
  452. /**
  453. * Checks the value of field is equal to value passed.
  454. *
  455. * @param $field
  456. * @param $value
  457. * @see PhpBrowser::seeInField()
  458. *
  459. * ! This method is generated. DO NOT EDIT. !
  460. * ! Documentation taken from corresponding module !
  461. */
  462. public function seeInField($field, $value) {
  463. $this->scenario->assertion('seeInField', func_get_args());
  464. if ($this->scenario->running()) {
  465. $result = $this->scenario->runStep();
  466. return new Maybe($result);
  467. }
  468. return new Maybe();
  469. }
  470. /**
  471. * Checks the value in field is not equal to value passed.
  472. * Field is searched by its id|name|label|value or CSS selector.
  473. *
  474. * @param $field
  475. * @param $value
  476. * @see PhpBrowser::dontSeeInField()
  477. *
  478. * ! This method is generated. DO NOT EDIT. !
  479. * ! Documentation taken from corresponding module !
  480. */
  481. public function dontSeeInField($field, $value) {
  482. $this->scenario->action('dontSeeInField', func_get_args());
  483. if ($this->scenario->running()) {
  484. $result = $this->scenario->runStep();
  485. return new Maybe($result);
  486. }
  487. return new Maybe();
  488. }
  489. /**
  490. * Finds and returns text contents of element.
  491. * Element is searched by CSS selector, XPath or matcher by regex.
  492. *
  493. * Example:
  494. *
  495. * ``` php
  496. * <?php
  497. * $heading = $I->grabTextFrom('h1');
  498. * $heading = $I->grabTextFrom('descendant-or-self::h1');
  499. * $value = $I->grabTextFrom('~<input value=(.*?)]~sgi');
  500. * ?>
  501. * ```
  502. *
  503. * @param $cssOrXPathOrRegex
  504. * @return mixed
  505. * @see PhpBrowser::grabTextFrom()
  506. *
  507. * ! This method is generated. DO NOT EDIT. !
  508. * ! Documentation taken from corresponding module !
  509. */
  510. public function grabTextFrom($cssOrXPathOrRegex) {
  511. $this->scenario->action('grabTextFrom', func_get_args());
  512. if ($this->scenario->running()) {
  513. $result = $this->scenario->runStep();
  514. return new Maybe($result);
  515. }
  516. return new Maybe();
  517. }
  518. /**
  519. * Finds and returns field and returns it's value.
  520. * Searches by field name, then by CSS, then by XPath
  521. *
  522. * Example:
  523. *
  524. * ``` php
  525. * <?php
  526. * $name = $I->grabValueFrom('Name');
  527. * $name = $I->grabValueFrom('input[name=username]');
  528. * $name = $I->grabValueFrom('descendant-or-self::form/descendant::input[@name = 'username']');
  529. * ?>
  530. * ```
  531. *
  532. * @param $field
  533. * @return mixed
  534. * @see PhpBrowser::grabValueFrom()
  535. *
  536. * ! This method is generated. DO NOT EDIT. !
  537. * ! Documentation taken from corresponding module !
  538. */
  539. public function grabValueFrom($field) {
  540. $this->scenario->action('grabValueFrom', func_get_args());
  541. if ($this->scenario->running()) {
  542. $result = $this->scenario->runStep();
  543. return new Maybe($result);
  544. }
  545. return new Maybe();
  546. }
  547. /**
  548. *
  549. * @see PhpBrowser::grabAttribute()
  550. *
  551. * ! This method is generated. DO NOT EDIT. !
  552. * ! Documentation taken from corresponding module !
  553. */
  554. public function grabAttribute() {
  555. $this->scenario->action('grabAttribute', func_get_args());
  556. if ($this->scenario->running()) {
  557. $result = $this->scenario->runStep();
  558. return new Maybe($result);
  559. }
  560. return new Maybe();
  561. }
  562. /**
  563. * Enters a directory In local filesystem.
  564. * Project root directory is used by default
  565. *
  566. * @param $path
  567. * @see Filesystem::amInPath()
  568. *
  569. * ! This method is generated. DO NOT EDIT. !
  570. * ! Documentation taken from corresponding module !
  571. */
  572. public function amInPath($path) {
  573. $this->scenario->condition('amInPath', func_get_args());
  574. if ($this->scenario->running()) {
  575. $result = $this->scenario->runStep();
  576. return new Maybe($result);
  577. }
  578. return new Maybe();
  579. }
  580. /**
  581. * Opens a file and stores it's content.
  582. *
  583. * Usage:
  584. *
  585. * ``` php
  586. * <?php
  587. * $I->openFile('composer.json');
  588. * $I->seeInThisFile('codeception/codeception');
  589. * ?>
  590. * ```
  591. *
  592. * @param $filename
  593. * @see Filesystem::openFile()
  594. *
  595. * ! This method is generated. DO NOT EDIT. !
  596. * ! Documentation taken from corresponding module !
  597. */
  598. public function openFile($filename) {
  599. $this->scenario->action('openFile', func_get_args());
  600. if ($this->scenario->running()) {
  601. $result = $this->scenario->runStep();
  602. return new Maybe($result);
  603. }
  604. return new Maybe();
  605. }
  606. /**
  607. * Deletes a file
  608. *
  609. * ``` php
  610. * <?php
  611. * $I->deleteFile('composer.lock');
  612. * ?>
  613. * ```
  614. *
  615. * @param $filename
  616. * @see Filesystem::deleteFile()
  617. *
  618. * ! This method is generated. DO NOT EDIT. !
  619. * ! Documentation taken from corresponding module !
  620. */
  621. public function deleteFile($filename) {
  622. $this->scenario->action('deleteFile', func_get_args());
  623. if ($this->scenario->running()) {
  624. $result = $this->scenario->runStep();
  625. return new Maybe($result);
  626. }
  627. return new Maybe();
  628. }
  629. /**
  630. * Deletes directory with all subdirectories
  631. *
  632. * ``` php
  633. * <?php
  634. * $I->deleteDir('vendor');
  635. * ?>
  636. * ```
  637. *
  638. * @param $dirname
  639. * @see Filesystem::deleteDir()
  640. *
  641. * ! This method is generated. DO NOT EDIT. !
  642. * ! Documentation taken from corresponding module !
  643. */
  644. public function deleteDir($dirname) {
  645. $this->scenario->action('deleteDir', func_get_args());
  646. if ($this->scenario->running()) {
  647. $result = $this->scenario->runStep();
  648. return new Maybe($result);
  649. }
  650. return new Maybe();
  651. }
  652. /**
  653. * Copies directory with all contents
  654. *
  655. * ``` php
  656. * <?php
  657. * $I->copyDir('vendor','old_vendor');
  658. * ?>
  659. * ```
  660. *
  661. * @param $src
  662. * @param $dst
  663. * @see Filesystem::copyDir()
  664. *
  665. * ! This method is generated. DO NOT EDIT. !
  666. * ! Documentation taken from corresponding module !
  667. */
  668. public function copyDir($src, $dst) {
  669. $this->scenario->action('copyDir', func_get_args());
  670. if ($this->scenario->running()) {
  671. $result = $this->scenario->runStep();
  672. return new Maybe($result);
  673. }
  674. return new Maybe();
  675. }
  676. /**
  677. * Checks If opened file has `text` in it.
  678. *
  679. * Usage:
  680. *
  681. * ``` php
  682. * <?php
  683. * $I->openFile('composer.json');
  684. * $I->seeInThisFile('codeception/codeception');
  685. * ?>
  686. * ```
  687. *
  688. * @param $text
  689. * @see Filesystem::seeInThisFile()
  690. *
  691. * ! This method is generated. DO NOT EDIT. !
  692. * ! Documentation taken from corresponding module !
  693. */
  694. public function seeInThisFile($text) {
  695. $this->scenario->assertion('seeInThisFile', func_get_args());
  696. if ($this->scenario->running()) {
  697. $result = $this->scenario->runStep();
  698. return new Maybe($result);
  699. }
  700. return new Maybe();
  701. }
  702. /**
  703. * Checks If opened file doesn't contain `text` in it
  704. *
  705. * ``` php
  706. * <?php
  707. * $I->openFile('composer.json');
  708. * $I->seeInThisFile('codeception/codeception');
  709. * ?>
  710. * ```
  711. *
  712. * @param $text
  713. * @see Filesystem::dontSeeInThisFile()
  714. *
  715. * ! This method is generated. DO NOT EDIT. !
  716. * ! Documentation taken from corresponding module !
  717. */
  718. public function dontSeeInThisFile($text) {
  719. $this->scenario->action('dontSeeInThisFile', func_get_args());
  720. if ($this->scenario->running()) {
  721. $result = $this->scenario->runStep();
  722. return new Maybe($result);
  723. }
  724. return new Maybe();
  725. }
  726. /**
  727. * Deletes a file
  728. * @see Filesystem::deleteThisFile()
  729. *
  730. * ! This method is generated. DO NOT EDIT. !
  731. * ! Documentation taken from corresponding module !
  732. */
  733. public function deleteThisFile() {
  734. $this->scenario->action('deleteThisFile', func_get_args());
  735. if ($this->scenario->running()) {
  736. $result = $this->scenario->runStep();
  737. return new Maybe($result);
  738. }
  739. return new Maybe();
  740. }
  741. /**
  742. * Checks if file exists in path.
  743. * Opens a file when it's exists
  744. *
  745. * ``` php
  746. * <?php
  747. * $I->seeFileFound('UserModel.php','app/models');
  748. * ?>
  749. * ```
  750. *
  751. * @param $filename
  752. * @param string $path
  753. * @see Filesystem::seeFileFound()
  754. *
  755. * ! This method is generated. DO NOT EDIT. !
  756. * ! Documentation taken from corresponding module !
  757. */
  758. public function seeFileFound($filename, $path = null) {
  759. $this->scenario->assertion('seeFileFound', func_get_args());
  760. if ($this->scenario->running()) {
  761. $result = $this->scenario->runStep();
  762. return new Maybe($result);
  763. }
  764. return new Maybe();
  765. }
  766. }