Example #1
0
 /**
  * Set type
  *
  * @param integer $type
  * @return CeModel
  */
 public function setType($type)
 {
     parent::setType($type);
     return $this;
 }
Example #2
0
 private function getCeModelObjects()
 {
     $adminModel1 = new CeModel();
     $adminModel1->setName('Admin model 1');
     $adminModel1->setSlug('admin_model_1');
     $adminModel1->setRiskRating(1);
     $adminModel1->setType(CeModel::TYPE_STRATEGY);
     $adminModel2 = new CeModel();
     $adminModel2->setName('Admin model 2');
     $adminModel2->setSlug('admin_model_2');
     $adminModel2->setRiskRating(2);
     $adminModel2->setType(CeModel::TYPE_STRATEGY);
     $model1 = $this->getMock('Wealthbot\\AdminBundle\\Entity\\CeModel', array('getId'));
     $model1->expects($this->any())->method('getId')->will($this->returnValue(31));
     $model1->setName('Model1');
     $model1->setSlug('model1');
     $model1->setOwnerId(1);
     $model1->setRiskRating(5);
     $model1->setType(CeModel::TYPE_STRATEGY);
     $child1 = new CeModel();
     $child1->setName('Child model 1');
     $child1->setSlug('child_model_1');
     $child1->setOwnerId(1);
     $child1->setParentId(31);
     $model2 = new CeModel();
     $model2->setName('Model2');
     $model2->setSlug('model2');
     $model2->setOwnerId(1);
     $model2->setRiskRating(7);
     $model3 = new CeModel();
     $model3->setName('Model3');
     $model3->setSlug('model3');
     $model3->setOwnerId(6);
     $model3->setRiskRating(2);
     $objects = array();
     $objects[] = $adminModel1;
     $objects[] = $adminModel2;
     $objects[] = $model1;
     $objects[] = $child1;
     $objects[] = $model2;
     $objects[] = $model3;
     return $objects;
 }
Example #3
0
 public function testIsCustom()
 {
     $this->model->setType(CeModel::TYPE_CUSTOM);
     $this->assertEquals(true, $this->model->isCustom());
 }