|
From: Jason S. <jsw...@ya...> - 2003-12-18 19:54:19
|
With this test,
function TestFindCardsExact()
{
$o_wiz =& new MockWizard($this);
$a_test = array('test');
$o_rs =& new MockAdoRecordSet($this);
$o_rs->SetReturnValue('GetArray', $a_test);
$this->_aoConn->SetReturnReference('Execute', $o_rs);
$this->AssertIsA($o_cc =& new CostCard(TEST_PLANT), 'CostCard');
$this->AssertIsA($a_ret = $o_cc->FindCards($o_wiz), 'array');
$this->AssertEqual($a_ret, $a_test);
}
I get a bunch of errors if I return a string in $a_ret and then compare it to
$a_test. Looks like some kind of an initial type check is missing perhaps?
As a quick work around, reversing the tested parameters order
($this->AssertEqual($a_test, $a_ret);) cleans everything up.
Fail: testfindcardsexact->[String: select cc.cost_card_nmbr from cost_card cc]
should be type [array]
Fail: testfindcardsexact->Equal expectation fails at character 0 with [select
cc.cost_card_nmbr from cost_card cc] and [Array]
Exception: testfindcardsexact->Unexpected PHP error [Array to string
conversion] severity [E_NOTICE] in
[/home/httpd/phplib/simpletest_1.0beta2/dumper.php] line [294]
Exception: testfindcardsexact->Unexpected PHP error [Array to string
conversion] severity [E_NOTICE] in
[/home/httpd/phplib/simpletest_1.0beta2/dumper.php] line [301]
Exception: testfindcardsexact->Unexpected PHP error [Array to string
conversion] severity [E_NOTICE] in
[/home/httpd/phplib/simpletest_1.0beta2/dumper.php] line [301]
Exception: testfindcardsexact->Unexpected PHP error [Array to string
conversion] severity [E_NOTICE] in
[/home/httpd/phplib/simpletest_1.0beta2/dumper.php] line [301]
Exception: testfindcardsexact->Unexpected PHP error [Array to string
conversion] severity [E_NOTICE] in
[/home/httpd/phplib/simpletest_1.0beta2/dumper.php] line [301]
Exception: testfindcardsexact->Unexpected PHP error [Array to string
conversion] severity [E_NOTICE] in
[/home/httpd/phplib/simpletest_1.0beta2/dumper.php] line [301]
Exception: testfindcardsexact->Unexpected PHP error [Array to string
conversion] severity [E_NOTICE] in
[/home/httpd/phplib/simpletest_1.0beta2/dumper.php] line [301]
Exception: testfindcardsexact->Unexpected PHP error [Array to string
conversion] severity [E_NOTICE] in
[/home/httpd/phplib/simpletest_1.0beta2/dumper.php] line [112]
Regards,
Jason
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
|