PHP code example of ecomdev / phpspec-file-matcher
1. Go to this page and download the library: Download ecomdev/phpspec-file-matcher library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ecomdev / phpspec-file-matcher example snippets
namespace spec\Example;
use PhpSpec\ObjectBehavior;
class FileSpec extends ObjectBehavior
{
function it_creates_a_file_on_save()
{
$this->save('file.txt', 'some_nice_content')
->shouldCreateFile('file.txt')
->shouldHaveFileContent('file.txt', 'some_nice_content');
}
}