* scripts/phpunit HelloTest * * * If your script (which would need to be in HelloTest.php) is found and runs, * UR DOIN IT RIGHT! */ /** * Class HelloTest */ class HelloTest extends PHPUnit\Framework\TestCase { /** * contains the object handle of the string class * @var string */ public $abc; /** * Called before the test functions will be executed. * this function is defined in PHPUnit_TestCase and overwritten * here */ public function setUp(): void { // create a new instance of String with the // string 'abc' $this->abc = 'hello'; } /** * Called after the test functions are executed. * this function is defined in PHPUnit_TestCase and overwritten * here. */ public function tearDown(): void { // delete your instance unset($this->abc); } /** * test the toString function. */ public function testHello(): void { $result = $this->abc; $this->assertEquals('hello', $result); } }