*/
public $abc;
- /**
- * @param string|null $name
- */
- public function __construct($name = NULL) {
- parent::__construct($name);
- }
-
/**
* Called before the test functions will be executed.
* this function is defined in PHPUnit_TestCase and overwritten
* here
*/
- public function setUp() {
+ public function setUp(): void {
// create a new instance of String with the
// string 'abc'
- $this->abc = "hello";
+ $this->abc = 'hello';
}
/**
* this function is defined in PHPUnit_TestCase and overwritten
* here.
*/
- public function tearDown() {
+ public function tearDown(): void {
// delete your instance
unset($this->abc);
}
/**
* test the toString function.
*/
- public function testHello() {
+ public function testHello(): void {
$result = $this->abc;
- $expected = 'hello';
- $this->assertEquals($result, $expected);
+ $this->assertEquals('hello', $result);
}
}