PHP code example of soy-php / codeception-task

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

    

soy-php / codeception-task example snippets




$recipe = new \Soy\Recipe();

$recipe->component('default', function (\Soy\Codeception\BuildTask $buildTask, \Soy\Codeception\RunTask $runTask) {
    $buildTask
        ->setVerbose(true)
        ->run();

    $runTask
        ->setCoverageFormats([
            \Soy\Codeception\RunTask::COVERAGE_TEXT,
            \Soy\Codeception\RunTask::COVERAGE_XML => 'my-report.xml',
        ])
        ->addReportFormat(\Soy\Codeception\RunTask::REPORT_JSON)
        ->setVerbose(true)
        ->setDebug(true)
        ->run();
});

return $recipe;