PHP code example of fangx / testing
1. Go to this page and download the library: Download fangx/testing 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/ */
fangx / testing example snippets
namespace HyperfTest\Cases;
class UserTest extends \Fangx\Testing\TestCase
{
use \Fangx\Testing\Concerns\CommandCaller;
use \Fangx\Testing\Concerns\RefreshDatabase;
public function testExample()
{
$this->assertTrue(true);
}
}
bash
php bin/hyperf.php fx:test UserTest
php bin/hyperf.php fx:test UserTest --unit