Beispiel #1
0
 public function testGetStringArray()
 {
     $params = new CM_Params(array('k1' => 9, 'k2' => array(99, '121', '72', 0x3f), 'k3' => array('4', '8' . '3', '43', 'pong')));
     $this->assertSame(array('4', '83', '43', 'pong'), $params->getStringArray('k3'));
     try {
         $params->getStringArray('k1');
         $this->fail('Is not an array of strings!');
     } catch (CM_Exception_InvalidParam $e) {
         $this->assertTrue(true);
     }
     try {
         $params->getStringArray('k2');
         $this->fail('Is not an array of strings!');
     } catch (CM_Exception_InvalidParam $e) {
         $this->assertTrue(true);
     }
 }