public function mapType($type) { $type = ucfirst($type); if (empty($this->classTypes[$type])) { throw new Exception('Invalid object type.'); } return $this->classTypes[$type]; }
/** * Test that mapType returns the correct package names. * * @dataProvider mapTypeProvider * @return void */ public function testMapType($original, $expected) { $this->assertEquals($expected, $this->Task->mapType($original)); }