public function testDiagnosisHistory() { $sim = new \Application\Model\SimModel(); $sim->setImsi("214071000000002"); $from = ''; $until = ''; // IMPORTANT: We check GSM and IP diagnosis with a single mapper call $data = $this->simMapper->getDiagnosisHistory($sim, $from, $until); // Structure $this->assertInternalType('array', $data); $this->assertNotEmpty($data); $this->assertArrayHasKey('end_date', $data[0]); $this->assertArrayHasKey('description', $data[0]); // Count $this->assertEquals(4, count($data)); }
public function testDiagnosisHistory() { $sim = $this->simMapper->findOneById("00000000000000000015", self::MASTER_ORG_ID); $data = $this->simMapper->getDiagnosisHistory($sim); $this->assertInternalType('array', $data); $this->assertNotEmpty($data); $this->assertArrayHasKey('end_date', $data[0]); $this->assertArrayHasKey('description', $data[0]); }