public function testFilterByRefFkCompositeKey() { BookstoreDataPopulator::depopulate(); BookstoreDataPopulator::populate(); BookstoreDataPopulator::populateOpinionFavorite(); // prepare the test data $testOpinion = BookOpinionQuery::create()->innerJoin('BookOpinion.ReaderFavorite')->findOne(); $testFavorite = $testOpinion->getReaderFavorite(); $opinion = BookOpinionQuery::create()->filterByReaderFavorite($testFavorite)->findOne(); $this->assertEquals($testOpinion, $opinion, 'Generated query handles filterByRefFk() methods correctly for composite fkeys'); }