Hi,
i tried to use agavi test. When i looked at the
Default_IndexActionTest i recognized the function testHasTests().
Is it the intesion to assign there the functions which should be
tested, ie:
...
public function testHasTests()
{
$this->testGetArray();
}
public function testGetArray() {
[somestuff]
$this->assertTrue($aArray);
}
...
As I am understood simpletest right, every function which will begin
with test.. will be tested, so normally the testHasTests is
unnecessary. Or is it just there, to remind you to write a test for
it?
If there is an other intesion, then please let me know.
How do you test, for example Default_IndexActionTest, if you have in
the Default_IndexAction class an construct like this:
$foo = $this->getContext()->getRequest()->getParameter('foo');
normally i would get a error like: call to a member function on a
non-object...
Do I have to write a Dummy object (Mock?), which will be taken
instead of the real object. But how do I do that and how do I assign
it to the test, that it will be used in the right place?
Regards Erik
--
J. Erik Heinz
Keyboard-samuraing in process
_______________________________________________
agavi-dev mailing list
[email protected]
http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev