object = new PMScript(); } /** * 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('PMScript'); $this->assertTrue(count($methods) == 7); } /** * @covers PMScript::PMScript * @todo Implement testPMScript(). */ public function testPMScript() { $methods = get_class_methods($this->object); $this->assertTrue( in_array('PMScript', $methods ), 'exists method PMScript' ); $r = new ReflectionMethod('PMScript', 'PMScript'); $params = $r->getParameters(); } /** * @covers PMScript::setFields * @todo Implement testsetFields(). */ public function testsetFields() { $methods = get_class_methods($this->object); $this->assertTrue( in_array('setFields', $methods ), 'exists method setFields' ); $r = new ReflectionMethod('PMScript', 'setFields'); $params = $r->getParameters(); $this->assertTrue($params[0]->getName() == 'aFields'); $this->assertTrue($params[0]->isArray() == false); $this->assertTrue($params[0]->isOptional () == true); $this->assertTrue($params[0]->getDefaultValue() == array()); } /** * @covers PMScript::setScript * @todo Implement testsetScript(). */ public function testsetScript() { $methods = get_class_methods($this->object); $this->assertTrue( in_array('setScript', $methods ), 'exists method setScript' ); $r = new ReflectionMethod('PMScript', 'setScript'); $params = $r->getParameters(); $this->assertTrue( $params[0]->getName() == 'sScript'); $this->assertTrue( $params[0]->isArray() == false); $this->assertTrue( $params[0]->isOptional () == true); $this->assertTrue( $params[0]->getDefaultValue() == ''); } /** * @covers PMScript::validSyntax * @todo Implement testvalidSyntax(). */ public function testvalidSyntax() { $methods = get_class_methods($this->object); $this->assertTrue( in_array('validSyntax', $methods ), 'exists method validSyntax' ); $r = new ReflectionMethod('PMScript', 'validSyntax'); $params = $r->getParameters(); $this->assertTrue( $params[0]->getName() == 'sScript'); $this->assertTrue( $params[0]->isArray() == false); $this->assertTrue( $params[0]->isOptional () == false); } /** * @covers PMScript::executeAndCatchErrors * @todo Implement testexecuteAndCatchErrors(). */ public function testexecuteAndCatchErrors() { $methods = get_class_methods($this->object); $this->assertTrue( in_array('executeAndCatchErrors', $methods ), 'exists method executeAndCatchErrors' ); $r = new ReflectionMethod('PMScript', 'executeAndCatchErrors'); $params = $r->getParameters(); $this->assertTrue( $params[0]->getName() == 'sScript'); $this->assertTrue( $params[0]->isArray() == false); $this->assertTrue( $params[0]->isOptional () == false); $this->assertTrue( $params[1]->getName() == 'sCode'); $this->assertTrue( $params[1]->isArray() == false); $this->assertTrue( $params[1]->isOptional () == false); } /** * @covers PMScript::execute * @todo Implement testexecute(). */ public function testexecute() { $methods = get_class_methods($this->object); $this->assertTrue( in_array('execute', $methods ), 'exists method execute' ); $r = new ReflectionMethod('PMScript', 'execute'); $params = $r->getParameters(); } /** * @covers PMScript::evaluate * @todo Implement testevaluate(). */ public function testevaluate() { $methods = get_class_methods($this->object); $this->assertTrue( in_array('evaluate', $methods ), 'exists method evaluate' ); $r = new ReflectionMethod('PMScript', 'evaluate'); $params = $r->getParameters(); } }