I'm relatively new to PHPUnit and TDD, and I was wondering how I might test the following code:
class File
{
/**
* Write data to a given file
*
* @param string $file
* @param string $content
* @return mixed
*/
public function put($path, $content)
{
return file_put_contents($path, $content);
}
}
How can I test if the file was created WITHOUT actually creating the file (with PHPUnit obviously).
Thanks.