public function setUp()
 {
     parent::setUp();
     $this->_spMapper = \Application\Model\Mapper\ServicePackMapper::getInstance();
     $this->_lfMapper = \Application\Model\Mapper\LifeCycleMapper::getInstance();
     $this->_restMapper = \Application\Model\Mapper\RestrictionMapper::getInstance();
     $this->_tflcMapper = \Application\Model\Mapper\TariffPlanLifeCycleMapper::getInstance();
     $this->_tfservMapper = \Application\Model\Mapper\TariffPlanServicesMapper::getInstance();
     $this->_servicePackData = array("name" => "SPTesting" . "-" . microtime(true), "description" => "A service pack for integration test", "currency" => self::CURRENCY, "changeCost" => 3000, "whiteList" => array("34696*", "34697*", "34695777888"), "blackList" => array("34666*", "34677*", "34655777888"), "roamingList" => array("34666*", "34677*", "34655777888"), "listsLocked" => true);
     $this->_lifeCycleData = array("name" => "LifeCycle" . "-" . microtime(true), "description" => "LifeCycle for integration tests", "status" => array(array('status' => LifeCycleModel::STATUS_INACTIVE_NEW, 'timer' => 100, 'transitions' => array(array('destinationStatus' => LifeCycleModel::STATUS_TEST, 'manual' => true, 'automatic' => false), array('destinationStatus' => LifeCycleModel::STATUS_SUSPENDED, 'manual' => true, 'automatic' => true, 'automaticInfo' => array('timerCause' => true, 'firstUseCause' => false, 'voucherCause' => false)))), array('status' => LifeCycleModel::STATUS_TEST, 'vouchers' => array('voice' => array('home' => 234)), 'transitions' => array(array('destinationStatus' => LifeCycleModel::STATUS_ACTIVATION_READY, 'manual' => true, 'automatic' => true, 'automaticInfo' => array('timerCause' => false, 'firstUseCause' => false, 'voucherCause' => true, 'voucherCauseInfo' => array('type' => Model\LifeCycle\VoucherCauseInfoModel::CAUSE_TYPE_ANY, 'vouchers' => array(Model\LifeCycle\VoucherCauseInfoModel::VOUCHER_TYPE_VOICE_HOME)))), array('destinationStatus' => LifeCycleModel::STATUS_SUSPENDED, 'manual' => true, 'automatic' => false))), array('status' => LifeCycleModel::STATUS_ACTIVATION_READY, 'transitions' => array(array('destinationStatus' => LifeCycleModel::STATUS_ACTIVE, 'manual' => false, 'automatic' => true, 'automaticInfo' => array('timerCause' => false, 'firstUseCause' => true, 'voucherCause' => false)), array('destinationStatus' => LifeCycleModel::STATUS_SUSPENDED, 'manual' => true, 'automatic' => false))), array('status' => LifeCycleModel::STATUS_ACTIVE, 'transitions' => array(array('destinationStatus' => LifeCycleModel::STATUS_DEACTIVATED, 'manual' => true, 'automatic' => false), array('destinationStatus' => LifeCycleModel::STATUS_SUSPENDED, 'manual' => true, 'automatic' => false))), array('status' => LifeCycleModel::STATUS_DEACTIVATED, 'transitions' => array(array('destinationStatus' => LifeCycleModel::STATUS_ACTIVE, 'manual' => true, 'automatic' => false), array('destinationStatus' => LifeCycleModel::STATUS_SUSPENDED, 'manual' => true, 'automatic' => false))), array('status' => LifeCycleModel::STATUS_SUSPENDED, 'transitions' => array(array('destinationStatus' => LifeCycleModel::STATUS_DEACTIVATED, 'manual' => true, 'automatic' => false), array('destinationStatus' => LifeCycleModel::STATUS_ACTIVE, 'manual' => true, 'automatic' => false), array('destinationStatus' => LifeCycleModel::STATUS_ACTIVATION_READY, 'manual' => true, 'automatic' => false), array('destinationStatus' => LifeCycleModel::STATUS_TEST, 'manual' => true, 'automatic' => false), array('destinationStatus' => LifeCycleModel::STATUS_INACTIVE_NEW, 'manual' => true, 'automatic' => false), array('destinationStatus' => LifeCycleModel::STATUS_RETIRED, 'manual' => true, 'automatic' => false))), array('status' => LifeCycleModel::STATUS_RETIRED)));
     $this->_restrictionsData = array('name' => "RestTest" . "-" . microtime(true), 'description' => "Restrinctions for integration test", 'operator' => array(self::OPERATOR), 'voice' => array('mo' => array('home' => true, 'roaming' => true, 'international' => true), 'mt' => array('home' => true, 'roaming' => true, 'international' => true)), 'sms' => array('mo' => array('home' => true, 'roaming' => true, 'international' => true), 'mt' => array('home' => true, 'roaming' => true, 'international' => true)), 'data' => array('home' => false, 'roaming' => false));
     $this->_lifeCycleTariffPlanData = array('name' => "LCTPlantesting" . "-" . microtime(true), 'description' => "LifeCycle TariffPlan for integration tests", 'status' => array(array('status' => LifeCycleModel::STATUS_ACTIVE, 'cost' => 20), array('status' => LifeCycleModel::STATUS_DEACTIVATED, 'cost' => 120)), 'transitions' => array(array('statusStart' => LifeCycleModel::STATUS_INACTIVE_NEW, 'statusFinal' => LifeCycleModel::STATUS_ACTIVATION_READY, 'cost' => 12), array('statusStart' => LifeCycleModel::STATUS_INACTIVE_NEW, 'statusFinal' => LifeCycleModel::STATUS_TEST, 'cost' => 12), array('statusStart' => LifeCycleModel::STATUS_INACTIVE_NEW, 'statusFinal' => LifeCycleModel::STATUS_ACTIVATION_PENDANT, 'cost' => 12), array('statusStart' => LifeCycleModel::STATUS_DEACTIVATED, 'statusFinal' => LifeCycleModel::STATUS_ACTIVE, 'cost' => 12), array('statusStart' => LifeCycleModel::STATUS_SUSPENDED, 'statusFinal' => LifeCycleModel::STATUS_RETIRED, 'cost' => 12)));
     $this->_servicesTariffPlanData = array('name' => "STPlanTesting" . "-" . microtime(true), 'description' => "Services TariffPlan for integration tests", 'defaultData' => array("t2N" => 7, "t2Q" => 8, 'pool' => true), 'data' => array(array('zoneId' => self::ZONE_ID_2, 'destinationId' => self::DESTINATION_ID_2, 'n1' => 1, "n2" => 2, "n3" => 3, "n4" => 4, "n5" => 5, "q1" => 6, "t2N" => 7, "t2Q" => 8, "t4N" => 9, "t4Q" => 10, "t6N" => 11, "t6Q" => 12, 'pool' => true)), 'defaultOrigVoice' => array("t2N" => 7, "t2Q" => 8, 'pool' => true), 'origVoice' => array(array('zoneId' => self::ZONE_ID_2, 'destinationId' => self::DESTINATION_ID_2, "t2N" => 7, "t2Q" => 8, 'pool' => true)), 'defaultTermVoice' => array("t2N" => 7, "t2Q" => 8, 'pool' => true), 'termVoice' => array(array('zoneId' => self::ZONE_ID_1, 'destinationId' => self::DESTINATION_ID_1, "t2N" => 7, "t2Q" => 8, 'pool' => true)), 'defaultSms' => array("t2N" => 1, "t2Q" => 2, 'pool' => true), 'sms' => array(array('zoneId' => self::ZONE_ID_2, 'destinationId' => self::DESTINATION_ID_2, "t2N" => 7, "t2Q" => 8, 'pool' => true)));
 }
 /**
  * Get mapper instance
  *
  * @return ProtoAbstractMapper|MongoAbstractMapper
  */
 public function getMapper($type = null)
 {
     if (!$type) {
         return parent::getMapper();
     }
     // Call mapper static method
     switch (strtolower($type)) {
         case self::TYPE_LIFECYCLE:
             return \Application\Model\Mapper\TariffPlanLifeCycleMapper::getInstance();
             break;
         case self::TYPE_SERVICES:
             return \Application\Model\Mapper\TariffPlanServicesMapper::getInstance();
             break;
         default:
             throw new AppEx\InvalidArgumentException("Invalid Type given");
     }
 }
 protected function setUp()
 {
     parent::setUp();
     $this->_mapper = \Application\Model\Mapper\TariffPlanServicesMapper::getInstance();
 }
 public function setUp()
 {
     $this->TariffPlanServicesMapper = TariffPlanServicesMapper::getInstance();
     $this->_user = $this->_createAuthUser(array('userName' => 'TariffPlanUserTest', 'organizationId' => self::PROVIDER_COMMERCIAL_ORG_ID));
     $this->testArray = array('name' => 'tarif plan 01', 'description' => 'tarif plan 01', 'currencyId' => 978, 'data' => array('defaultData' => array('zones' => array(array('id' => 1, 'name' => 'Zone1')), 'destinations' => array(array('id' => 1, 'name' => 'Destination1')), 't6N' => 4, 't6Q' => 4, 'prorrationThreshold' => 0, 'adjustmentThreshold' => 0), 'data' => array(array('zones' => array(array('id' => 1, 'name' => 'Zone1')), 'destinations' => array(array('id' => 1, 'name' => 'Destination1')), 'n1' => 4, 'n2' => 4, 'n3' => 4, 'n4' => 4, 'n5' => 4, 'q1' => 4, 't2N' => 4, 't2Q' => 4, 't4N' => 4, 't4Q' => 4, 't6N' => 4, 't6Q' => 4, 'prorrationThreshold' => 0, 'adjustmentThreshold' => 0)), 'defaultOrigVoice' => array('zones' => array(array('id' => 1, 'name' => 'Zone1')), 'destinations' => array(array('id' => 1, 'name' => 'Destination1')), 't6N' => 1, 't6Q' => 1, 'prorrationThreshold' => 0, 'adjustmentThreshold' => 0), 'origVoice' => array(array('zones' => array(array('id' => 1, 'name' => 'Zone1')), 'destinations' => array(array('id' => 1, 'name' => 'Destination1')), 'n1' => 1, 'n2' => 1, 'n3' => 1, 'n4' => 1, 'n5' => 1, 'q1' => 1, 't2N' => 1, 't2Q' => 1, 't4N' => 1, 't4Q' => 1, 't6N' => 1, 't6Q' => 1, 'prorrationThreshold' => 0, 'adjustmentThreshold' => 0)), 'defaultTermVoice' => array('zones' => array(array('id' => 1, 'name' => 'Zone1')), 'destinations' => array(array('id' => 1, 'name' => 'Destination1')), 't6N' => 2, 't6Q' => 2, 'prorrationThreshold' => 0, 'adjustmentThreshold' => 0), 'termVoice' => array(array('zones' => array(array('id' => 1, 'name' => 'Zone1')), 'destinations' => array(array('id' => 1, 'name' => 'Destination1')), 'n1' => 2, 'n2' => 2, 'n3' => 2, 'n4' => 2, 'n5' => 2, 'q1' => 2, 't2N' => 2, 't2Q' => 2, 't4N' => 2, 't4Q' => 2, 't6N' => 2, 't6Q' => 2, 'prorrationThreshold' => 0, 'adjustmentThreshold' => 0)), 'defaultSms' => array('zones' => array(array('id' => 1, 'name' => 'Zone1')), 'destinations' => array(array('id' => 1, 'name' => 'Destination1')), 't6N' => 3, 't6Q' => 3, 'prorrationThreshold' => 0, 'adjustmentThreshold' => 0), 'sms' => array(array('zones' => array(array('id' => 1, 'name' => 'Zone1')), 'destinations' => array(array('id' => 1, 'name' => 'Destination1')), 'n1' => 3, 'n2' => 3, 'n3' => 3, 'n4' => 3, 'n5' => 3, 'q1' => 3, 't2N' => 3, 't2Q' => 3, 't4N' => 3, 't4Q' => 3, 't6N' => 3, 't6Q' => 3, 'prorrationThreshold' => 0, 'adjustmentThreshold' => 0)), 'poolDefaultData' => array('zones' => array(array('id' => 1, 'name' => 'Zone1')), 'destinations' => array(array('id' => 1, 'name' => 'Destination1')), 't6N' => 8, 't6Q' => 8, 'prorrationThreshold' => 0, 'adjustmentThreshold' => 0), 'poolData' => array(array('zones' => array(array('id' => 1, 'name' => 'Zone1')), 'destinations' => array(array('id' => 1, 'name' => 'Destination1')), 'n1' => 8, 'n2' => 8, 'n3' => 8, 'n4' => 8, 'n5' => 8, 'q1' => 8, 't2N' => 8, 't2Q' => 8, 't4N' => 8, 't4Q' => 8, 't6N' => 8, 't6Q' => 8, 'prorrationThreshold' => 0, 'adjustmentThreshold' => 0)), 'poolDefaultOrigVoice' => array('zones' => array(array('id' => 1, 'name' => 'Zone1')), 'destinations' => array(array('id' => 1, 'name' => 'Destination1')), 't6N' => 5, 't6Q' => 5, 'prorrationThreshold' => 0, 'adjustmentThreshold' => 0), 'poolOrigVoice' => array(array('zones' => array(array('id' => 1, 'name' => 'Zone1')), 'destinations' => array(array('id' => 1, 'name' => 'Destination1')), 'n1' => 5, 'n2' => 5, 'n3' => 5, 'n4' => 5, 'n5' => 5, 'q1' => 5, 't2N' => 5, 't2Q' => 5, 't4N' => 5, 't4Q' => 5, 't6N' => 5, 't6Q' => 5, 'prorrationThreshold' => 0, 'adjustmentThreshold' => 0)), 'poolDefaultTermVoice' => array('zones' => array(array('id' => 1, 'name' => 'Zone1')), 'destinations' => array(array('id' => 1, 'name' => 'Destination1')), 't6N' => 6, 't6Q' => 6, 'prorrationThreshold' => 0, 'adjustmentThreshold' => 0), 'poolTermVoice' => array(array('zones' => array(array('id' => 1, 'name' => 'Zone1')), 'destinations' => array(array('id' => 1, 'name' => 'Destination1')), 'n1' => 6, 'n2' => 6, 'n3' => 6, 'n4' => 6, 'n5' => 6, 'q1' => 6, 't2N' => 6, 't2Q' => 6, 't4N' => 6, 't4Q' => 6, 't6N' => 6, 't6Q' => 6, 'prorrationThreshold' => 0, 'adjustmentThreshold' => 0)), 'poolDefaultSms' => array('zones' => array(array('id' => 1, 'name' => 'Zone1')), 'destinations' => array(array('id' => 1, 'name' => 'Destination1')), 't6N' => 7, 't6Q' => 7, 'prorrationThreshold' => 0, 'adjustmentThreshold' => 0), 'poolSms' => array(array('zones' => array(array('id' => 1, 'name' => 'Zone1')), 'destinations' => array(array('id' => 1, 'name' => 'Destination1')), 'n1' => 7, 'n2' => 7, 'n3' => 7, 'n4' => 7, 'n5' => 7, 'q1' => 7, 't2N' => 7, 't2Q' => 7, 't4N' => 7, 't4Q' => 7, 't6N' => 7, 't6Q' => 7, 'prorrationThreshold' => 0, 'adjustmentThreshold' => 0))));
 }