1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <?php
- abstract class sfTester
- {
- protected
- $inABlock = false,
- $browser = null,
- $tester = null;
-
- public function __construct(sfTestFunctionalBase $browser, $tester)
- {
- $this->browser = $browser;
- $this->tester = $tester;
- }
-
- abstract public function prepare();
-
- abstract public function initialize();
-
- public function begin()
- {
- $this->inABlock = true;
- return $this->browser->begin();
- }
-
- public function end()
- {
- $this->inABlock = false;
- return $this->browser->end();
- }
-
- public function getObjectToReturn()
- {
- return $this->inABlock ? $this : $this->browser;
- }
- public function __call($method, $arguments)
- {
- call_user_func_array(array($this->browser, $method), $arguments);
- return $this->getObjectToReturn();
- }
- }
|