PHP code example of task / phpspec

1. Go to this page and download the library: Download task/phpspec 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/ */

    

task / phpspec example snippets


use Task\Plugin\PhpSpecPlugin;

$project->inject(function ($container) {
    $container['phpspec'] = new PhpSpecPlugin;
});

$project->addTask('test', ['phpspec', function ($phpspec) {
    $phpspec->command('run')
        ->setConfig($this->getProperty('config', 'phpspec.yml'))
        ->setFormat('pretty')
        ->pipe($this->getOutput());
}]);