Ejemplo n.º 1
0
 /**
  * updateRec() tests
  *  - attribute type changed.
  *
  * @test
  */
 public function POS_it_checks_updateRec_att_type_changed()
 {
     // create the record to check
     $type = 'Bob';
     $taskType = new TaskType();
     $taskType->setType($type);
     $taskType->setDescription('was here');
     $taskType->created_at = Carbon::now();
     $taskType->updated_at = Carbon::now();
     $taskType->client_id = 1;
     $taskType->save();
     // create the changed record
     $changeType = 'Steve';
     $stdClass = new \stdClass();
     $stdClass->id = $taskType->id;
     $stdClass->type = $changeType;
     $stdClass->desc = $taskType->getDescription();
     $stdClass->client_id = $taskType->client_id;
     $taskType->updateRec($stdClass);
     $result = $taskType::where('id', $taskType->getId())->first();
     $this->assertEquals($result->getType(), $changeType);
 }