Codeception/Codeception — pull request #1333 by TroyRudolph (2014-08-20 18:03:07+00:00)
Title: When calling WebDriver::attachFile(), if the specified file does not

exist, RemoteWebElement::sendKeys() winds up being called anyway and
then WebDriverKeys::encode attempts to do a "foreach" over a null.

This fails with " [ErrorException] Invalid argument supplied for
foreach()". This errors is confusing to the folks we are trying to train
to do test automation.

Modfied WebDriver::attachFile() to verify that the file exists and is
readable. If not, an exception is thrown.