private function getSerialized(BetweenQuery $query) { $text = 'between[' . $query->getPropertyId()->getNumericId() . ','; if ($query->getBeginValue() !== null) { $text .= $query->getBeginValue()->getTime(); } if ($query->getEndValue() !== null) { $text .= ',' . $query->getEndValue()->getTime(); } return $text . ']'; }
public function testGetEndValue() { $query = new BetweenQuery(new PropertyId('P42'), new TimeValue('+1952-03-11T00:00:00Z', 0, 0, 0, TimeValue::PRECISION_DAY, 'foo'), new TimeValue('+1952-03-12T00:00:00Z', 0, 0, 0, TimeValue::PRECISION_DAY, 'foo')); $this->assertEquals(new TimeValue('+1952-03-12T00:00:00Z', 0, 0, 0, TimeValue::PRECISION_DAY, 'foo'), $query->getEndValue()); }