public function checkWriteable($path = null, $config)
{
$response = array();
$response['resource'] = $path;
// Set this to ensure the developer knows there $path was set.
$response['config'] = $config;
if (is_null($path)) {
$response['error'] = 'The Codeception Log is not set. Is the Codeception configuration set up?';
} elseif (!file_exists($path)) {
$response['error'] = 'The Codeception Log directory does not exist. Please check the following path exists:';
} elseif (!is_writeable($path)) {
$response['error'] = 'The Codeception Log directory can not be written to yet. Please check the following path has \'chmod 777\' set:';
}
$response['ready'] = !isset($response['error']);
return $response;
}