public function testDeviceModelCodeServiceImport() { foreach ($this->getData('device-model', 'device-models') as $data) { if (isset($data['codes']) && is_array($data['codes'])) { foreach ($data['codes'] as $code) { $obj = new DeviceModel\Code(); $obj->import($code); $this->assertEquals($code['code'], $obj->getCode()); $this->assertEquals($code['device_model_id'], $obj->getDeviceModelId()); $this->assertEquals($code['id'], $obj->getId()); $this->assertEquals($code['notes'], $obj->getNotes()); $this->assertInternalType('string', $obj->getCode()); $this->assertInternalType('int', $obj->getDeviceModelId()); $this->assertInternalType('int', $obj->getId()); $this->assertInternalType('string', $obj->getNotes()); } } } }