Skip to content

Commit

Permalink
Add seeFile method to API
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyWay committed Apr 12, 2015
1 parent b4ca490 commit e55f4a7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Emulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ public function select($element, $option);
*/
public function attachFile($element, $absolutePath);

/**
* Ensure that the given file exists.
*
* @param string $path
* @return static
*/
public function seeFile($path);

/**
* Ensure that a database table contains a row with the given data.
*
Expand Down
13 changes: 13 additions & 0 deletions src/Extensions/IntegrationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,19 @@ protected function assertFilterProducedResults($filter)
}
}

/**
* Ensure that the given file exists.
*
* @param string $path
* @return static
*/
public function seeFile($path)
{
$this->assertFileExists($path);

return $this;
}

/**
* Ensure that a database table contains a row with the given data.
*
Expand Down

0 comments on commit e55f4a7

Please sign in to comment.