/** * @group EricssonTariffPlanInt */ public function testTariffPlanServicesFindByCustomer() { if ($this->_user->getId()) { $this->_user->delete(); } $this->_user = $this->_createAuthUser(array('userName' => 'TariffPlanUserIntegrationTest1-' . microtime(true), 'organizationId' => 'customer-the_second_customer2222222222222')); $tariffplan = $this->TariffPlanServicesMapper->findOneById(1); unset($this->testData['name']); unset($this->testData['description']); unset($this->testData['currencyId']); $this->assertEquals($this->testArray, $tariffplan->getResponseData()); }
/** * @group EricssonRestrictionInt */ public function testFindOneById3() { $this->_user = $this->_createAuthUser(array('userName' => 'RestrictionUserIntegrationTest5-' . microtime(true), 'organizationId' => 'customer-the_second_customer2222222222222')); $restriction = $this->restictionMapper->findOneById('3'); $this->assertNotNull($restriction); $this->assertInstanceOf('\\Application\\Model\\RestrictionModel', $restriction); $this->assertEquals('3', $restriction->getId()); $this->assertEquals('ALL RESTRICTION COMM', $restriction->getName()); $this->assertEquals('ALL RESTRICTION COMM', $restriction->getDescription()); //Ericsson doesn't return the serviceProvider // $this->assertEquals('34536645634565777', $restriction->getServiceProviderId()); // $this->assertEquals('serviceProviderRestrictions1', $restriction->getServiceProviderName()); $this->assertNull($restriction->getOperator(), "Testing operator list"); $this->assertNull($restriction->getApn(), "Testing APN list"); $this->assertInstanceOf('\\Application\\Model\\Restriction\\DataRestrictionModel', $restriction->getData()); $data = $restriction->getData(); $this->assertEquals(true, $data->getHome(), "Testing data at home"); $this->assertEquals(true, $data->getRoaming(), "Testing data on roaming"); $this->assertInstanceOf('\\Application\\Model\\Restriction\\VoiceSmsRestrictionModel', $restriction->getVoice()); $data = $restriction->getVoice()->getMo(); $this->assertEquals(true, $data->getHome(), "Testing voice mo at home"); $this->assertEquals(true, $data->getRoaming(), "Testing voice mo on roaming"); $this->assertEquals(true, $data->getInternational(), "Testing voice mo international"); $data = $restriction->getVoice()->getMt(); $this->assertEquals(true, $data->getHome(), "Testing voice mt at home"); $this->assertEquals(true, $data->getRoaming(), "Testing voice mt on roaming"); $this->assertInstanceOf('\\Application\\Model\\Restriction\\VoiceSmsRestrictionModel', $restriction->getSms()); $data = $restriction->getSms()->getMo(); $this->assertEquals(true, $data->getHome(), "Testing sms mo at home"); $this->assertEquals(true, $data->getRoaming(), "Testing sms mo on roaming"); $this->assertEquals(true, $data->getInternational(), "Testing sms mo international"); $data = $restriction->getSms()->getMt(); $this->assertEquals(true, $data->getHome(), "Testing sms mt at home"); $this->assertEquals(true, $data->getRoaming(), "Testing sms mt on roaming"); }
public function testRestrictionInsert() { $data = $this->restrictionMapper->findOneById(1); $this->assertNotNull($data); $this->assertInstanceOf("\\Application\\Model\\RestrictionModel", $data); $data->setId(null); $this->restrictionMapper->insert($data); $this->assertNotNull($data->getId()); }
/** * @group EricssonLifeCycleInt */ public function testFindLifeCycle4() { if ($this->_user->getId()) { $this->_user->delete(); } $this->_user = $this->_createAuthUser(array('userName' => 'LifeCycleUserIntegrationTest1-' . microtime(true), 'organizationId' => 'customer-the_fist_customer000000000000000')); $lifecycle = $this->lifecycleMapper->findOneById(2); $this->assertEquals($this->testArray, $lifecycle->getResponseData()); }
protected function _createRestrictions() { $restrictions = new Model\RestrictionModel($this->_restrictionsData); $this->_restMapper->insert($restrictions); $this->assertNotNull($restrictions->getId()); $newRestrinctions = $this->_restMapper->findOneById($restrictions->getId()); $this->assertNotNull($newRestrinctions, "Restrictions does not exist"); // $this->_checkSavedData($this->_restrictionsData, $newRestrinctions, "Restrinctions"); return $restrictions->getId(); }
/** * @group EricssonTariffPlanLifeCycleInt */ public function testFindTariffPlanLifeCycle2() { if ($this->_user->getId()) { $this->_user->delete(); } $this->_user = $this->_createAuthUser(array('userName' => 'TariffPlanUserIntegrationTest1-' . microtime(true), 'organizationId' => 'customer-the_second_customer2222222222222')); $tariffplanLifecycle = $this->tariffplanLifecycleMapper->findOneById(1, 2); $this->assertEquals(1, $tariffplanLifecycle->getLifeCycleId()); $this->assertEquals('commercial', $tariffplanLifecycle->getLifeCycleName()); $this->assertEquals('LC2', $tariffplanLifecycle->getName()); $this->assertEquals('Description2', $tariffplanLifecycle->getDescription()); $this->assertEquals('978', $tariffplanLifecycle->getCurrencyId()); $this->assertEquals($this->testArray2, $tariffplanLifecycle->getData()); }