public function test_join() { $qb = new QueryBuilder(); $qb->addTable('first'); $qb->addTable('second'); $qb->addTable('third'); $qb->addLeftJoin('second', 'fourth', 'fourth', 'second.foo=fourth.foo'); $this->assertEquals(array('first', 'second', 'fourth', 'third'), array_keys($qb->from)); }