![]() |
Problems with CIUnit - redeclare class error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Problems with CIUnit - redeclare class error (/showthread.php?tid=25338) |
Problems with CIUnit - redeclare class error - El Forum - 12-09-2009 [eluser]n0-0ne[/eluser] HI I’ve just downloaded CIUnit 0.17 to unit test my code igniter application. PHPUnit version 3.4.3 CI version 1.7.2 I’m now learning CI and built a really simple blog model class (doesn’t really do any thing yet) but when I try to test it I get the Fatal error that the class has already been declared Code: $ phpunit --verbose AllTests.php the test code itself is also very simple - Code: <?php any idea why this would happen ? Problems with CIUnit - redeclare class error - El Forum - 12-10-2009 [eluser]n0-0ne[/eluser] Ok never mind found the solution. this was cosed becose my text editor saves back file ending with .php~ in the directory. CIUnit thought they were tests and try to run them so it declared the test clases twice. deleting the backups solved the problem Problems with CIUnit - redeclare class error - El Forum - 07-14-2010 [eluser]Shiro[/eluser] Hi, can you show more example how you use the CITest, because I can't get the understanding for how to use the test module. As we know we use php CRUD, how can we implement it? Sorry for this kind of basic question, but I know Test is important, but I dunno how to start for it, and automatic it. |