object = new Numbering(); $this->properties = array( 'numId' => array(null, 1), 'type' => array(null, 'singleLevel'), ); foreach ($this->properties as $property => $value) { list($default, $expected) = $value; $get = "get{$property}"; $set = "set{$property}"; $this->assertEquals($default, $this->object->$get()); // Default value $this->object->$set($expected); $this->assertEquals($expected, $this->object->$get()); // New value } } /** * Test get level */ public function testGetLevels() { $this->object = new Numbering(); $this->assertEmpty($this->object->getLevels()); } }