/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { $PHPDS = TEST_main::instance(); $this->object = $PHPDS->_factory('PHPDS_controller'); $_POST = array('post' => 10); $_GET = array('get' => 20); $this->object->construct(); }
public function testAccessors() { $instance = TEST_main::instance(); $obj = $instance->_factory('TEST_dependant', array('a', 3)); $this->assertEquals('a', $obj->A); // A is public $this->assertEquals(3, $obj->B); // B is protected $obj->C = 5; $this->assertEquals('(50)', $obj->C); // B is accessed $this->setExpectedException('Exception'); // B is protected $obj->B = 4; }
protected function setUp() { $PHPDS = TEST_main::instance(); $this->query = $PHPDS->_factory('TEST_pdoMysqlQuery'); }