public function testGetSetElectoralWard() { $expected = new ElectoralWard('CODE', 'NAME'); $this->assertEmpty($this->instance->getElectoralWard()); $this->assertEmpty($this->instance->getElectoralWardName()); $this->assertInstanceOf(Authority::class, $this->instance->setElectoralWard($expected)); $this->assertEquals($expected, $this->instance->getElectoralWard()); $this->assertEquals($expected->getElectoralWardName(), $this->instance->getElectoralWardName()); }
/** * @param Authority $updateAuthority * @param Authority $baseAuthority */ protected function updateElectoralWard(Authority $updateAuthority, Authority &$baseAuthority) { if ($updateAuthority->getElectoralWard() instanceof ElectoralWard) { $baseAuthority->setElectoralWard($updateAuthority->getElectoralWard()); } }