_instance = new Solarium_Plugin_CustomizeRequest_Customization(); } public function testSetAndGetKey() { $value = 'mykey'; $this->_instance->setKey($value); $this->assertEquals($value, $this->_instance->getKey()); } public function testSetAndGetName() { $value = 'myname'; $this->_instance->setName($value); $this->assertEquals($value, $this->_instance->getName()); } public function testSetAndGetType() { $value = 'mytype'; $this->_instance->setType($value); $this->assertEquals($value, $this->_instance->getType()); } public function testSetAndGetValue() { $value = 'myvalue'; $this->_instance->setValue($value); $this->assertEquals($value, $this->_instance->getValue()); } public function testSetAndGetPersistence() { $value = true; $this->_instance->setPersistent($value); $this->assertEquals($value, $this->_instance->getPersistent()); } public function testSetAndGetOverwrite() { $value = false; $this->_instance->setOverwrite($value); $this->assertEquals($value, $this->_instance->getOverwrite()); } public function testIsValid() { $this->_instance->setKey('mykey'); $this->_instance->setType('param'); $this->_instance->setName('myname'); $this->_instance->setValue('myvalue'); $this->assertTrue($this->_instance->isValid()); } public function testIsValidWithInvalidType() { $this->_instance->setKey('mykey'); $this->_instance->setType('mytype'); $this->_instance->setName('myname'); $this->_instance->setValue('myvalue'); $this->assertFalse($this->_instance->isValid()); } public function testIsValidWithMissingValue() { $this->_instance->setKey('mykey'); $this->_instance->setType('param'); $this->_instance->setName('myname'); $this->assertFalse($this->_instance->isValid()); } }