public function endsWith($element) { $rep = Condition::stringOf($element); return $this->is(new Match(function ($value) use($element) { return sizeof($value) > 0 && Objects::equal($value[sizeof($value) - 1], $element); }, ['%s does not end with ' . $rep, '%s ends with ' . $rep])); }
/** * Returns whether this optional equals a given value. * * @param var $cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && $this->present === $cmp->present && Objects::equal($this->value, $cmp->value); }
/** * Check whether a given value is equal to this node list * * @param var $cmp The value * @return bool */ public function equals($cmp) { return $cmp instanceof self && $this->name === $cmp->name && $this->invert === $cmp->invert && $this->start === $cmp->start && $this->end === $cmp->end && \util\Objects::equal($this->options, $cmp->options) && $this->nodes->equals($cmp->nodes); }
/** * Returns whether another object is equal to this * * @param lang.Generic $cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && $this->name === $cmp->name && $this->debug === $cmp->debug && $this->arguments === $cmp->arguments && $this->environment === $cmp->environment && $this->scriptlet === null ? null === $cmp->scriptlet : $this->scriptlet->equals($cmp->scriptlet) && Objects::equal($this->logLevels, $cmp->logLevels) && 0 === $this->config->compareTo($cmp->config); }
/** * Returns whether a given value is equal to this code unit * * @param var $cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && ($this->package === $cmp->package && Objects::equal($this->imports, $cmp->imports) && Objects::equal($this->declaration, $cmp->declaration)); }
/** * Returns whether a given value is equal to this mime part * * @param var $cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && $this->contenttype === $cmp->contenttype && $this->charset === $cmp->charset && $this->encoding === $cmp->encoding && $this->disposition === $cmp->disposition && $this->name === $cmp->name && $this->filename === $cmp->filename && $this->id === $cmp->id && $this->body === $cmp->body && Objects::equal($this->headers, $cmp->headers); }
/** * Returns whether a given value is equal to this code unit * * @param var $cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && (Objects::equal($this->parameters, $cmp->parameters) && $this->return->equals($cmp->return)); }
public function differently_ordered_hashes_are_equal() { $this->assertTrue(Objects::equal(['price' => 12.99, 'color' => 'blue'], ['color' => 'blue', 'price' => 12.99])); }
/** * Returns whether a given value is equal to this code unit * * @param var $cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && ($this->base->equals($cmp->base) && Objects::equal($this->arguments, $cmp->arguments)); }
/** * Indicates whether the argument on postion $pos machtes the specified * value. * * @param int pos * @param var value * @return bool */ private function doesMatchArg($pos, $value) { $argVal = $this->args[$pos]; if ($argVal instanceof \unittest\mock\arguments\IArgumentMatcher) { return $argVal->matches($value); } else { return Objects::equal($argVal, $value); } }
/** * Check whether a given value is equal to this node list * * @param var $cmp The value * @return bool */ public function equals($cmp) { return $cmp instanceof self && $this->source === $cmp->source && \util\Objects::equal($this->root, $cmp->root); }
/** * Returns whether a given value is equal to this Response instance * * @param var $cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && $this->status === $cmp->status && Objects::equal($this->headers, $cmp->headers) && Objects::equal($this->cookies, $cmp->cookies); }
/** * Returns whether a given value is equal to this Response instance * * @param var cmp * @return bool */ public function equals($cmp) { return parent::equals($cmp) && $this->mediaType === $cmp->mediaType && $this->contentLength === $cmp->contentLength && Objects::equal($this->inputStream, $cmp->inputStream); }
/** * Test whether a given value is equal to this location instance. * * @param var $cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && (abs($this->lat - $cmp->lat) < 1.0E-5 && abs($this->long - $cmp->long) < 1.0E-5 && Objects::equal($this->attr, $cmp->attr)); }
/** * Check if is equal to other object * * @param var $cmp * @return bool */ public function equals($cmp) { if (!$cmp instanceof self) { return false; } // If based on files, and both base on the same file, then they're equal if (null === $this->_data && null === $cmp->_data) { return $this->_file === $cmp->_file; } else { return Objects::equal($this->_data, $cmp->_data); } }
/** * Returns whether a given value is equal to this annotation * * @param var $cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && ($this->name === $cmp->name && Objects::equal($this->value, $cmp->value)); }
/** * Returns whether a given value is equal to this results instance * * @param var $cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && $this->path->equals($cmp->path) && Objects::equal($this->value, $cmp->value); }
/** * Returns whether a given value is equal to this payload * * @param var cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && Objects::equal($cmp->value, $this->value) && $this->properties === $cmp->properties; }
/** * Check whether a given value is equal to this node list * * @param var $cmp The value * @return bool */ public function equals($cmp) { return $cmp instanceof self && $this->name === $cmp->name && $this->escape === $cmp->escape && \util\Objects::equal($this->options, $cmp->options); }
/** * Returns whether a given comparison value is equal to this LDAP entry * * @param var $cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && $this->dn === $cmp->dn && Objects::equal($this->attributes, $cmp->attributes); }
/** * Returns whether a given value is equal to this pair * * @param var cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && Objects::equal($cmp->key, $this->key); }
/** * Returns whether a given value is equal to this code unit * * @param var $cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && Objects::equal($this->backing, $cmp->backing); }
/** * Returns true if a given value matches this `IsEqualToArray` condition. * * @param var $value * @return bool */ public function matches($value) { return Objects::equal($this->value, $value); }
/** * Checks whether an object is equal to this DSN * * @param lang.Generic cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && $cmp->getDriver() === $this->getDriver() && $cmp->getUser() === $this->getUser() && $cmp->getPassword() === $this->getPassword() && $cmp->getHost() === $this->getHost() && $cmp->getPort() === $this->getPort() && $cmp->getDatabase() === $this->getDatabase() && $cmp->flags === $this->flags && Objects::equal($cmp->prop, $this->prop); }
/** * Returns whether a given comparison value is equal to this node list * * @param var $cmp * @return string */ public function equals($cmp) { return $cmp instanceof self && $this->url === $cmp->url && $this->title === $cmp->title && Objects::equal($this->text, $cmp->text); }
/** * Assert that two values are not equal * * @param var expected * @param var actual * @param string error default 'equal' * @return void */ public function assertNotEquals($expected, $actual, $error = '!equals') { if (Objects::equal($expected, $actual)) { $this->fail($error, $actual, $expected); } }
/** * Returns whether a given value is equal to this list * * @param var $cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && Objects::equal($this->indexed, $cmp->indexed); }
/** * Check for equality * * @param var $cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && Objects::equal($cmp->failures, $this->failures); }
/** * Returns whether another instance is equal to this * * @param var $cmp * @return bool */ public function equals($cmp) { return $cmp instanceof self && Objects::equal($this->links, $cmp->links); }
/** * Returns whether a given comparison value is equal to this parse tree * * @param var $cmp * @return string */ public function equals($cmp) { return parent::equals($cmp) && Objects::equal($this->urls, $cmp->urls); }