public function testGetSetCountyName() { $expected = uniqid('CountyName'); $this->assertEmpty($this->instance->getCountyName()); $this->assertInstanceOf(County::class, $this->instance->setCountyName($expected)); $this->assertEquals($expected, $this->instance->getCountyName()); }
public function testFindByEntityCode() { $expected = new County('Code', 'Name'); $expected->setDateCreated($this->expectedDate); $returnedCounty = $this->instance->findByEntityCode($expected); $this->assertEquals($expected, $returnedCounty); }
/** * @VirtualProperty * @SerializedName("county") * * @return string */ public function getCountyName() { if ($this->county instanceof County) { return $this->county->getCountyName(); } return ''; }
/** * @param County $county * @return array<County> */ public function findCountyByNameAndEntityCode(County $county) { return $this->findBy(array('entityCode' => $county->getEntityCode(), 'countyName' => $county->getCountyName())); }
/** * @param County $county * @return null|object */ public function findByEntityCode(County $county) { return $this->entityManager->getRepository('TransformCore\\PHE\\LocalHealthAuthorityBundle\\Entity\\County')->findOneBy(array('entityCode' => $county->getEntityCode())); }