-
as seen on Stack Overflow
- Search for 'Stack Overflow'
What is SimpleTest? What does assertTrue($b) do? Why is SimpleTest useful and how might it be ideal for real world usage? Is it even practiced often?
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I normally use getter and setter methods on my objects and I am fine with testing them as mock objects in SimpleTest by manipulating them with code like:
Mock::generate('MyObj');
$MockMyObj->setReturnValue('getPropName', 'value')
However, I have recently started to use magic interceptors (__set()…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am using SimpleTest version 1.0.1 for a unit test.
I create a new mock object within a test method and on it i do:
$MockDbAdaptor->setReturnValue('query',1);
Now, when i run this in a standalone unit test my tested object is happy to see 1 returned when query() is called on the mock db adaptor…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am using SimpleTest version 1.0.1 for a unit test.
I create a new mock object within a test method and on it i do:
$MockDbAdaptor->setReturnValue('query',1);
Now, when i run this in a standalone unit test my tested object is happy to see 1 returned when query() is called on the mock db adaptor…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi everyone.
I am using SimpleBrowser from SimpleTest (http://www.simpletest.org) to login a webmin (http://www.webmin.com/). This login uses https. I've tried two different ways, both fail.
$browser = new SimpleBrowser();
$browser->useCookies();
$browser->useFrames();
//echoes the login page…
>>> More