Example #1
0
 /**
  * @covers ::hasManyThrough
  */
 public function testHasManyThrough()
 {
     $config = new Config('Harp\\Harp\\Test\\TestModel\\Country');
     $config->hasManyThrough('users', 'Harp\\Harp\\Test\\TestModel\\User', 'cities', ['foreignKey' => 'cityId']);
     $this->assertEquals(new HasManyThrough('users', $config, 'Harp\\Harp\\Test\\TestModel\\User', 'cities', ['foreignKey' => 'cityId']), $config->getRel('users'));
 }