public function testAddExtraOptionCannotOverwitePreservedOption() { $query = new LeanQuery("TestObject"); $query->skip(100); $query->addOption("skip", 50); $out = $query->encode(); $this->assertEquals(100, $out["skip"]); }
/** * Query on the target class of relation * * @return LeanQuery */ public function getQuery() { if ($this->targetClassName) { $query = new LeanQuery($this->targetClassName); } else { $query = new LeanQuery($this->parent->getClassName()); $query->addOption("redirectClassNameForKey", $this->key); } $query->relatedTo($this->key, $this->parent); return $query; }