/** * Create an OutletQuery selecting from an entity table * @param string $from entity table to select from * @return OutletQuery unexecuted */ public function from($from) { require_once 'OutletQuery.php'; $q = new OutletQuery($this); $q->from($from); return $q; }
public function testFluentInterface() { $query = new OutletQuery(); $result = $query->from('Entity')->where('where')->orderBy('order')->offset(3)->limit(1)->leftJoin('left')->innerJoin('join')->with('OtherEntity')->groupBy('group')->having('having')->select('select'); $this->assertThat($result, $this->isInstanceOf('OutletQuery')); }