<?php class SayHellow { public $name; public function __construct($name = 'nobody') { $this->name = $name; } public function speak() { return "Hellow ($this->name)!"; } } ?>
Sayhellowtest.php
<?php require_once 'SayHellow.php'; class SayHellowTest extends PHPUnit_Framework_TestCase { public function testSpeakWithoutParams() { $hellow = new SayHellow(); $this->assertEquals("Hellow nobody!", $hellow->speak()); } } ?>
1) SayHellowTest::testSpeakWithoutParams
Failed asserting that two strings are equal.
Dlaczego dostaję faild?
I co robi metoda assertEquals?