コード例 #1
0
 /**
  * @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());
 }
コード例 #2
0
 public function testCreateMsisdnEricsson()
 {
     $csvFileName = tempnam('/tmp', '_msisdnParserTest_');
     file_put_contents($csvFileName, '8934071279000005005,34682988695');
     $parser = new App_Parser_MSISDNParser($csvFileName);
     $list = $parser->parse();
     unlink($csvFileName);
     try {
         $this->assertNotNull($this->stockMapper->createMsisdnEricsson($list, $this->_user->getOrganizationId()));
     } catch (Exception $e) {
         $this->fail($e->getMessage());
     }
 }
コード例 #3
0
 /**
  * @group EricssonLifeCycleInt
  */
 public function testChangeState()
 {
     if ($this->_user->getId()) {
         $this->_user->delete();
     }
     $this->_user = $this->_createAuthUser(array('userName' => 'LifeCycleUserIntegrationTest1-' . microtime(true), 'organizationId' => 'customer-the_second_customer2222222222222'));
     $data = array('subscription_id' => array('id' => '34609100100', 'id_type' => 'MSISDN'), 'old_state' => 'INACTIVE_NEW', 'new_state' => 'ACTIVE', 'cost' => 500);
     $result = $this->lifecycleMapper->modifyStatusEricsson($data, 'customer-the_second_customer2222222222222');
     $this->assertEquals(true, $result);
 }
コード例 #4
0
 /**
  * @group EricssonRestrictionInt
  */
 public function testFindAll2()
 {
     if ($this->_user->getId()) {
         $this->_user->delete();
     }
     $this->_user = $this->_createAuthUser(array('userName' => 'RestrictionUserIntegrationTest2-' . microtime(true), 'organizationId' => 'provider-sp1 (commercial)1111111111111112'));
     $restrictions = $this->restictionMapper->findAll();
     $this->assertNotNull($restrictions);
     $this->assertEquals(2, $restrictions->getCount());
     $items = $restrictions->getItems();
     $this->assertEquals(2, count($items));
     $ericssonData = array(array('id' => '3', 'name' => 'ALL RESTRICTION COMM', 'description' => 'ALL RESTRICTION COMM', 'serviceProviderId' => 'provider-sp1 (commercial)1111111111111112', 'serviceProviderName' => 'sp2 (commercial)'), array('id' => '4', 'name' => 'DATA RESTRICTION COMM', 'description' => 'DATA RESTRICTION COMM', 'serviceProviderId' => 'provider-sp1 (commercial)1111111111111112', 'serviceProviderName' => 'sp2 (commercial)'));
     $i = 0;
     foreach ($items as $item) {
         $this->assertInstanceOf('\\Application\\Model\\RestrictionModel', $item);
         $this->assertEquals($ericssonData[$i]['id'], $item->getId());
         $this->assertEquals($ericssonData[$i]['name'], $item->getName());
         $this->assertEquals($ericssonData[$i]['description'], $item->getDescription());
         $this->assertEquals($ericssonData[$i]['serviceProviderId'], $item->getServiceProviderId());
         $this->assertEquals($ericssonData[$i]['serviceProviderName'], $item->getServiceProviderName());
         $i++;
     }
 }
コード例 #5
0
 /**
  * @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());
 }
コード例 #6
0
 public function tearDown()
 {
     if ($this->_user->getId()) {
         $this->_user->delete();
     }
 }