public function testGetSetCounty() { $expected = new County('CODE', 'NAME'); $this->assertEmpty($this->instance->getCounty()); $this->assertEmpty($this->instance->getCountyName()); $this->assertInstanceOf(Authority::class, $this->instance->setCounty($expected)); $this->assertEquals($expected, $this->instance->getCounty()); $this->assertEquals($expected->getCountyName(), $this->instance->getCountyName()); }
/** * @param Authority $updateAuthority * @param Authority $baseAuthority */ protected function updateCounty(Authority $updateAuthority, Authority &$baseAuthority) { if ($updateAuthority->getCounty() instanceof County) { $baseAuthority->setCounty($updateAuthority->getCounty()); } }