PHP code example of fidry / makefile
1. Go to this page and download the library: Download fidry/makefile 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/ */
fidry / makefile example snippets
declare(strict_types=1);
namespace Acme;
use Fidry\Makefile\Test\BaseMakefileTestCase;
/**
* @coversNothing
*/
class MakefileTest extends BaseMakefileTestCase
{
protected static function getMakefilePath(): string
{
return __DIR__.'/../Makefile';
}
protected function getExpectedHelpOutput(): string
{
// It looks a bit ugly due to the coloring, but in practice still remains easy to update.
// If you find it tedious to do it manually, I recommend to manually check the output
// with `make help` and then copy it, e.g. via `make help | pbcopy` and then paste it here.
return <<<'EOF'
[33mUsage:[0m
make TARGET
[32m#
# Commands
#---------------------------------------------------------------------------[0m
[33mdefault:[0m Runs the default task
[33mtest:[0m Runs all the tests
[33mcomposer_validate:[0m Validates the Composer package
[33mphpunit:[0m Runs PHPUnit
EOF;
}
}