/** * @dataProvider invalidEqualProvider */ public function test_that_are_equal_returns_false_for_invalid_value($value1, $value2) { $this->assertFalse(Validate::areEqual($value1, $value2)); }
/** * Locates a bucket by item * * Returns null if the item is not found. * * @param mixed $item The item * * @return ItemBucket|null */ protected function locate($item) { for ($this->rewind(); $this->valid(); $this->next()) { /** @var ItemBucket $current */ $current = $this->current; if (Validate::areEqual($item, $current->item())) { return $current; } } return null; }
/** * Locates a bucket by key * * Returns null if the key is not found. * * @param mixed $key The key * * @return KeyValueBucket|null */ protected function locate($key) { for ($this->rewind(); $this->valid(); $this->next()) { /** @var KeyValueBucket $current */ $current = $this->current; if (Validate::areEqual($key, $current->key())) { return $current; } } return null; }