object = new propelTable(); } /** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ protected function tearDown() { } /** * This is the default method to test, if the class still having * the same number of methods. */ public function testNumberOfMethodsInThisClass() { $methods = get_class_methods('propelTable'); $this->assertTrue(count($methods) == 8); } /** * @covers propelTable::prepareQuery * @todo Implement testprepareQuery(). */ public function testprepareQuery() { $methods = get_class_methods($this->object); $this->assertTrue(in_array('prepareQuery', $methods), 'exists method prepareQuery'); $r = new ReflectionMethod('propelTable', 'prepareQuery'); $params = $r->getParameters(); $this->assertTrue($params[0]->getName() == 'limitPage'); $this->assertTrue($params[0]->isArray() == false); $this->assertTrue($params[0]->isOptional() == true); $this->assertTrue($params[0]->getDefaultValue() == ''); } /** * @covers propelTable::setupFromXmlform * @todo Implement testsetupFromXmlform(). */ public function testsetupFromXmlform() { $methods = get_class_methods($this->object); $this->assertTrue(in_array('setupFromXmlform', $methods), 'exists method setupFromXmlform'); $r = new ReflectionMethod('propelTable', 'setupFromXmlform'); $params = $r->getParameters(); $this->assertTrue($params[0]->getName() == 'xmlForm'); $this->assertTrue($params[0]->isArray() == false); $this->assertTrue($params[0]->isOptional() == false); } /** * @covers propelTable::count * @todo Implement testcount(). */ public function testcount() { $methods = get_class_methods($this->object); $this->assertTrue(in_array('count', $methods), 'exists method count'); $r = new ReflectionMethod('propelTable', 'count'); $params = $r->getParameters(); } /** * @covers propelTable::renderTitle * @todo Implement testrenderTitle(). */ public function testrenderTitle() { $methods = get_class_methods($this->object); $this->assertTrue(in_array('renderTitle', $methods), 'exists method renderTitle'); $r = new ReflectionMethod('propelTable', 'renderTitle'); $params = $r->getParameters(); } /** * @covers propelTable::renderField * @todo Implement testrenderField(). */ public function testrenderField() { $methods = get_class_methods($this->object); $this->assertTrue(in_array('renderField', $methods), 'exists method renderField'); $r = new ReflectionMethod('propelTable', 'renderField'); $params = $r->getParameters(); $this->assertTrue($params[0]->getName() == 'row'); $this->assertTrue($params[0]->isArray() == false); $this->assertTrue($params[0]->isOptional() == false); $this->assertTrue($params[1]->getName() == 'r'); $this->assertTrue($params[1]->isArray() == false); $this->assertTrue($params[1]->isOptional() == false); $this->assertTrue($params[2]->getName() == 'result'); $this->assertTrue($params[2]->isArray() == false); $this->assertTrue($params[2]->isOptional() == false); } /** * @covers propelTable::defaultStyle * @todo Implement testdefaultStyle(). */ public function testdefaultStyle() { $methods = get_class_methods($this->object); $this->assertTrue(in_array('defaultStyle', $methods), 'exists method defaultStyle'); $r = new ReflectionMethod('propelTable', 'defaultStyle'); $params = $r->getParameters(); } /** * @covers propelTable::renderTable * @todo Implement testrenderTable(). */ public function testrenderTable() { $methods = get_class_methods($this->object); $this->assertTrue(in_array('renderTable', $methods), 'exists method renderTable'); $r = new ReflectionMethod('propelTable', 'renderTable'); $params = $r->getParameters(); $this->assertTrue($params[0]->getName() == 'block'); $this->assertTrue($params[0]->isArray() == false); $this->assertTrue($params[0]->isOptional() == true); $this->assertTrue($params[0]->getDefaultValue() == ''); $this->assertTrue($params[1]->getName() == 'fields'); $this->assertTrue($params[1]->isArray() == false); $this->assertTrue($params[1]->isOptional() == true); $this->assertTrue($params[1]->getDefaultValue() == ''); } /** * @covers propelTable::printForm * @todo Implement testprintForm(). */ public function testprintForm() { $methods = get_class_methods($this->object); $this->assertTrue(in_array('printForm', $methods), 'exists method printForm'); $r = new ReflectionMethod('propelTable', 'printForm'); $params = $r->getParameters(); $this->assertTrue($params[0]->getName() == 'filename'); $this->assertTrue($params[0]->isArray() == false); $this->assertTrue($params[0]->isOptional() == false); $this->assertTrue($params[1]->getName() == 'data'); $this->assertTrue($params[1]->isArray() == false); $this->assertTrue($params[1]->isOptional() == true); $this->assertTrue($params[1]->getDefaultValue() == array()); } }