Welcome Guest, Not a member yet? Register   Sign In
simple test in codeigniter
#1

[eluser]gulan[/eluser]
Hi all..

I want to do simple test for the php functions..
So i downloaded simpletest folder and put in system/app;ications/libraries
and application folder made one folder named test and wrote my my test cases in a file usertest.php it looks some what like this
<?php

require_once('../controllers/user.php');

class User_test extends UnitTestCase{
function testOpenlogin(){
$user = new User();
$add = $user->add(1,1);
$this->assertEqual($add, 2);
}
}
?>


but im getting the following error

Fatal error: Class 'Controller' not found in E:\softwares\xampp\htdocs\...\...\system\application\controllers\user.php on line 3

line 3 of user.php is
class User extends Controller {
how can i solve this???


Thanks
gulan
#2

[eluser]sophistry[/eluser]
try changing the capitalization of the filename.
#3

[eluser]gulan[/eluser]
Thanks....

Which file you are talking about?
Is it user.php
it is not capitalized... still having the problem
#4

[eluser]sophistry[/eluser]
i mean change it... try it both ways.




Theme © iAndrew 2016 - Forum software by © MyBB