public function setUp()
 {
     parent::setUp();
     $hourAgo = date('Y-m-d H:i:s', time() - 3600);
     $this->jobRepository = $this->repositoryFactory();
     $this->fixtures = [['id' => 1, 'status' => Job::ActiveStatus, 'class' => TestAction::ModelName, 'dateCreated' => $hourAgo], ['id' => 2, 'status' => Job::NewStatus, 'class' => TestAction::ModelName, 'dateCreated' => date('Y-m-d H:i:s')]];
     foreach ($this->fixtures as $row) {
         $job = new TestAction($row, $this->jobRepository);
         $this->jobRepository->insert($job);
     }
 }
Example #2
0
 public function insert()
 {
     $this->repository->insert($this);
 }