public function testWhereAttribute() { $b = new WhereBuilder(); $b->setRootAlias('__'); $b->setInvolvedTable('_', Blog::table()); $b->root('Article')->whereAttr('blogId', '_/id'); $components = $b->build(); $where[] = ['type' => 'Attribute', 'lTable' => '__', 'lCols' => ['blog_id'], 'op' => '=', 'rTable' => '_', 'rCols' => ['id'], 'logic' => 'AND']; $this->assertEquals($where, $components['where']); }