Check this
Posted: Tue Oct 17, 2006 6:09 am
JayBird | Please use
is there anything wrong in the code? I also want to know, if i change the function name test_insert(), it does not work. If i want to write a new function, what should i do?
JayBird | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]Code: Select all
<?php
set_include_path("library/");
require_once 'members.php';
require_once 'PHPUnit/Framework/TestCase.php';
require_once 'PHPUnit.php';
class MembersTest extends PHPUnit_TestCase {
function test_insert()
{
$new=new Members;
$dbActual=$new->AddOrUpdateMember('a','b','c','d','e','f','g','h','i','j','k','','table1');
$dbExpected=1;
$this->assertTrue($dbExpected=="$dbActual", "INSERT FAILED");
}
}
$suite = new PHPUnit_TestSuite('MembersTest');
$result = PHPUnit::run($suite);
print $result->toHTML();
?>is there anything wrong in the code? I also want to know, if i change the function name test_insert(), it does not work. If i want to write a new function, what should i do?
JayBird | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]