Exemplo n.º 1
0
 /**
  * Validates if properties is valid or not.
  * 
  * @param mix $properties The properties array.
  * 
  * @return none
  */
 private function _validateProperties($properties)
 {
     Validate::isArray($properties, 'entity properties');
     foreach ($properties as $key => $value) {
         Validate::isString($key, 'key');
         Validate::isTrue($value instanceof Property, Resources::INVALID_PROP_MSG);
         Validate::isTrue(EdmType::validateEdmValue($value->getEdmType(), $value->getValue(), $condition), sprintf(Resources::INVALID_PROP_VAL_MSG, $key, $condition));
     }
 }
Exemplo n.º 2
0
 /**
  * @covers MicrosoftAzure\Storage\Table\Models\EdmType::validateEdmValue
  */
 public function testValidateEdmValueWithInvalid()
 {
     // Assert
     $this->setExpectedException('\\InvalidArgumentException');
     // Test
     EdmType::validateEdmValue('7amada', '1233');
 }