I started learning PhpUnit and testing. I have a method which returns string, how I can write a test to check if this method returns string. Here is the code I have at this moment:
Method:
/**
* @return string
*/
public function living()
{
return 'Happy!';
}
Test:
public $real;
public $expected;
public function testLiving()
{
$this->expected = 'Happy';
$this->real = 'Speechless';
$this->assertTrue($this->expected == $this->real);
}