PHP code example of friendsofhyperf / pest-plugin-hyperf
1. Go to this page and download the library: Download friendsofhyperf/pest-plugin-hyperf 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/ */
friendsofhyperf / pest-plugin-hyperf example snippets
ned('BASE_PATH') or define('BASE_PATH', dirname(__DIR__, 1));
(function () {
\Hyperf\Di\ClassLoader::init();
\Hyperf\Context\ApplicationContext::setContainer(
new \Hyperf\Di\Container((new \Hyperf\Di\Definition\DefinitionSourceFactory())())
);
// $container->get(Hyperf\Contract\ApplicationInterface::class);
})();
shell
php vendor/bin/pest --coroutine
# or
php vendor/bin/pest --prepend test/prepend.php --coroutine