public function testActionClassDiffNameAndParams() { global $testquery, $testpost; $testquery = array(); $testpost = array(); $testpost['userid'] = 'johnsmith'; $testpost['user_Name'] = 'john'; $testpost['user_Age'] = '22'; $testpost['user_Hcp'] = '10,7'; $tc = new TestController(); $tc->init(); $tc->executeAction('paramsClassAndParam2'); $this->assertInstanceOf('Person', $tc->person); $this->assertEquals('john', $tc->person->Name); $this->assertEquals('johnsmith', $tc->userid); }