public function testGetSetEntityCode() { $expected = uniqid('E'); $this->assertEmpty($this->instance->getEntityCode()); $this->assertInstanceOf(LocalHealthAuthority::class, $this->instance->setEntityCode($expected)); $this->assertEquals($expected, $this->instance->getEntityCode()); }
/** * @param LocalHealthAuthority $localHealthAuthority * @return null|object */ public function findByEntityCode(LocalHealthAuthority $localHealthAuthority) { return $this->entityManager->getRepository('TransformCore\\PHE\\LocalHealthAuthorityBundle\\Entity\\LocalHealthAuthority')->findOneBy(array('entityCode' => $localHealthAuthority->getEntityCode())); }
/** * @param LocalHealthAuthority $lha * @return array<LocalHealthAuthority> */ public function findLhaByNameAndEntityCode(LocalHealthAuthority $lha) { return $this->findBy(array('entityCode' => $lha->getEntityCode(), 'localAuthorityName' => $lha->getLocalAuthorityName())); }