Example #1
0
 protected function action()
 {
     $this->className = $this->request->getParam('class');
     $this->hash = $this->request->getParam('hash');
     $this->actionDate = $this->request->getParam('actionDate');
     ClassName::validateClassName($this->className);
     //
     $job = new $this->className([], $this->jobRepository);
     $job->actionDate->setTime($this->actionDate);
     $job->hash = $this->hash;
     //
     $job->insert();
     return $job->id->getValue();
 }
 public function testWithCorrectClass()
 {
     $this->assertTrue(ClassName::validateClassName(TestAction::ModelName));
 }