public function setMaxQueryTime($max) { $max = intval($max); if ($max < 0) { throw new \InvalidArgumentException('Maximum query time cannot be negative.'); } $this->maxquerytime = $max; return $this; }
public function testSetMaxQueryTime() { $sphinx = new SphinxClient(); $sphinx->setMaxQueryTime(10); $this->assertSame($sphinx->maxquerytime, 10); }