From e55f4a79a3b998ef7dd3836c8c6687a94ea3a8cd Mon Sep 17 00:00:00 2001 From: JeffreyWay Date: Sun, 12 Apr 2015 11:46:56 -0400 Subject: [PATCH] Add seeFile method to API --- src/Emulator.php | 8 ++++++++ src/Extensions/IntegrationTrait.php | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/Emulator.php b/src/Emulator.php index f5d06cd..f05cc01 100644 --- a/src/Emulator.php +++ b/src/Emulator.php @@ -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. * diff --git a/src/Extensions/IntegrationTrait.php b/src/Extensions/IntegrationTrait.php index 7eef0a5..0e0a24a 100644 --- a/src/Extensions/IntegrationTrait.php +++ b/src/Extensions/IntegrationTrait.php @@ -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. *