Esempio n. 1
0
 public function testHasParam()
 {
     $param = new Elastica_Param();
     $key = 'name';
     $value = 'nicolas ruflin';
     $this->assertFalse($param->hasParam($key));
     $param->setParam($key, $value);
     $this->assertTrue($param->hasParam($key));
 }
Esempio n. 2
0
 public function testGetParamInvalid()
 {
     $param = new Elastica_Param();
     try {
         $param->getParam('notest');
         $this->fail('Should throw exception');
     } catch (Elastica_Exception_Invalid $e) {
         $this->assertTrue(true);
     }
 }