public function testRelationOneToOne() { $q = BookstoreEmployeeQuery::create()->joinBookstoreEmployeeAccount(); $joins = $q->getJoins(); $join = $joins['BookstoreEmployeeAccount']; $with = new ModelWith($join); $this->assertEquals($with->getRelationMethod(), 'setBookstoreEmployeeAccount', 'A ModelWith computes the relation method from the join'); $this->assertEquals($with->getRelationName(), 'BookstoreEmployeeAccount', 'A ModelWith computes the relation name from the join'); $this->assertFalse($with->isAdd(), 'A ModelWith computes the relation cardinality from the join'); }