Page 1 of 1

what am i doing wrong? : unit testing

Posted: Wed Sep 28, 2011 3:32 am
by urboyfriend
i am reading this tutorial

http://www.phpeveryday.com/articles/Sim ... --P56.html

i am using simpletest_1.1alpha2.tar.gz

my simpletest folder is inside htdocs/test
my test.php is also inside htdocs/test

i got this error

http://i172.photobucket.com/albums/w11/ ... terror.jpg

i was expecting this

http://farm4.static.flickr.com/3126/234 ... f5.jpg?v=0

what am i doing wrong?

Re: what am i doing wrong? : unit testing

Posted: Wed Sep 28, 2011 10:41 am
by Christopher
That is an old tutorial probably, so it is now __construct(). You don't need the constructor anyway, just do:

Code: Select all

class TestingTestCase extends UnitTestCase{
	 
    public function TestInterest(){
        $this->assertEqual(5, interest_per_year(100));
    }
	     
}