public function testBulkUpgradeLifeCycleAutomaticWithTest()
 {
     $this->_template->importData(Zend_Json::decode(self::LIFE_CYCLE_AUTOMATIC_WITH_TESTS));
     $this->_template->id = null;
     $this->_mapper->insert($this->_template);
     App_MigrationTool_TemplatesTo24_LifeCycleUtils::performUpgrade();
     $template = $this->_mapper->findOneById($this->_template->id);
     $this->assertInstanceOf('Application\\Model\\TemplateModel', $template);
     $lifeCycle = new LifeCycleModel($template->exportData());
     $this->assertInstanceOf('Application\\Model\\LifeCycleModel', $lifeCycle);
     $status = $lifeCycle->getStatusByOriginStatus(LifeCycleModel::STATUS_ACTIVATION_READY);
     $this->assertInstanceOf('Application\\Model\\LifeCycle\\StatusModel', $status);
     $trasition = $status->getTransitionByDestinationStatus(LifeCycleModel::STATUS_ACTIVE);
     $this->assertInstanceOf('Application\\Model\\LifeCycle\\TransitionModel', $trasition);
     $this->assertTrue($trasition->manual);
     $validator = new LifeCycleAutomaticWithTest();
     $this->assertTrue($validator->isValid($lifeCycle), var_export($validator->getMessages(), 1));
 }
 public function __construct($options = null)
 {
     parent::__construct($options);
     $this->_validators[LifeCycleModel::STATUS_ACTIVATION_READY] = '\\App_MigrationTool_TemplatesTo24_ActivationReadyValidate';
 }