public function describeTo(Hamcrest_Description $description) { $description->appendText('a value ')->appendText($this->_comparison($this->_minCompare)); if ($this->_minCompare != $this->_maxCompare) { $description->appendText(' or ')->appendText($this->_comparison($this->_maxCompare)); } $description->appendText(' ')->appendValue($this->_value); }
public function describeMismatch($item, Hamcrest_Description $description) { if ($item === null) { $description->appendText('was null'); } else { $description->appendText('was ')->appendText(self::getTypeDescription(strtolower(gettype($item))))->appendText(' ')->appendValue($item); } }
/** * Generates a description of the object. The description may be part * of a description of a larger object of which this is just a component, * so it should be worded appropriately. * * @param Hamcrest_Description $description * The description to be built or appended to. */ public function describeTo(\Hamcrest_Description $description) { if (empty($this->description)) { foreach ($this->expected as $expected) { $description->appendValue($expected); } } else { $description->appendText($this->description); } }
public function describeTo(Hamcrest_Description $description) { $textStart = 0; while (preg_match(self::ARG_PATTERN, $this->_descriptionTemplate, $matches, PREG_OFFSET_CAPTURE, $textStart)) { $text = $matches[0][0]; $index = $matches[1][0]; $offset = $matches[0][1]; $description->appendText(substr($this->_descriptionTemplate, $textStart, $offset - $textStart)); $description->appendValue($this->_values[$index]); $textStart = $offset + strlen($text); } if ($textStart < strlen($this->_descriptionTemplate)) { $description->appendText(substr($this->_descriptionTemplate, $textStart)); } }
public function describeMismatch($item, Hamcrest_Description $description) { if (!$this->_not) { $description->appendText('was not set'); } else { $property = $this->_property; if (is_array($item)) { $value = $item[$property]; } elseif (is_object($item)) { $value = $item->{$property}; } elseif (is_string($item)) { $value = $item::${$property}; } parent::describeMismatch($value, $description); } }
public function describeTo(Hamcrest_Description $description) { $description->appendText('a collection containing ')->appendDescriptionOf($this->_elementMatcher); }
public function describeTo(Hamcrest_Description $description) { $description->appendText('every item is ')->appendDescriptionOf($this->_matcher); }
public function describeTo(Hamcrest_Description $description) { $description->appendText('array with key ')->appendDescriptionOf($this->_keyMatcher); }
public function describeMismatch($item, Hamcrest_Description $description) { $description->appendText('was ')->appendValue($item); }
public function describeTo(Hamcrest_Description $description) { $description->appendDescriptionOf($this->_matcher); }
public function describeToWithOperator(Hamcrest_Description $description, $operator) { $description->appendList('(', ' ' . $operator . ' ', ')', $this->_matchers); }
public function describeTo(Hamcrest_Description $description) { $description->appendList($this->descriptionStart(), $this->descriptionSeparator(), $this->descriptionEnd(), $this->_elementMatchers); }
public function describeTo(Hamcrest_Description $description) { $description->appendText($this->_empty ? 'an empty string' : 'a non-empty string'); }
public function describeTo(\Hamcrest_Description $description) { $description->appendText('Apache_Solr_Document with properties ' . var_export($this->properties, true)); }
public function describeTo(Hamcrest_Description $description) { $description->appendText('a string ')->appendText($this->relationship())->appendText(' ')->appendValue($this->_substring); }
public function describeTo(Hamcrest_Description $description) { $description->appendText($this->_empty ? 'an empty traversable' : 'a non-empty traversable'); }
public function describeTo(\Hamcrest_Description $description) { $description->appendText('boolean and false'); }
public function describeTo(Hamcrest_Description $description) { $description->appendText('equalToIgnoringCase(')->appendValue($this->_string)->appendText(')'); }
public function describeTo(Hamcrest_Description $description) { $description->appendList('(', ' and ', ')', $this->_matchers); }
public function describeTo(Hamcrest_Description $description) { $description->appendText('a string containing ')->appendValueList('', ', ', '', $this->_substrings)->appendText(' in order'); }
public function describeTo(Hamcrest_Description $description) { $description->appendValue($this->_item); }
public function describeTo(Hamcrest_Description $description) { $description->appendText('null'); }
public function describeTo(Hamcrest_Description $description) { $description->appendText('SOME DESCRIPTION'); }
public function describeTo(Hamcrest_Description $description) { $description->appendText('an instance of ')->appendText($this->_theClass); }
public function describeTo(Hamcrest_Description $description) { $description->appendText($this->_text); }
public function describeTo(Hamcrest_Description $description) { $description->appendText('a numeric value within ')->appendValue($this->_delta)->appendText(' of ')->appendValue($this->_value); }
public function describeTo(\Hamcrest_Description $description) { $description->appendText('empty'); }
public function describeTo(Hamcrest_Description $description) { $description->appendList('[', ', ', ']', $this->_elementMatchers); }
public function describeTo(Hamcrest_Description $description) { $description->appendText('sameInstance(')->appendValue($this->_object)->appendText(')'); }
public final function describeTo(Hamcrest_Description $description) { $description->appendText($this->_featureDescription)->appendText(' ')->appendDescriptionOf($this->_subMatcher); }