示例#1
0
 /**
  * @test
  */
 public function shouldFailOnEmptyDateTo()
 {
     $this->setExpectedException(InvalidArgumentException::class);
     Filter::create(Users::fromCommaSeparatedString('admin'), DateRange::from(DateFrom::fromString(date('d-m-Y H:i:s')), DateTo::fromString('')));
 }
 /**
  * @param string $users
  * @param string $dateFrom
  * @param string $dateTo
  * @return Filter
  */
 public function createFrom($users, $dateFrom, $dateTo)
 {
     $users = $this->extractUsersFromRequest($users);
     return Filter::create(Users::fromCommaSeparatedString($users), DateRange::from(DateFrom::fromString(urldecode($dateFrom)), DateTo::fromString(urldecode($dateTo))));
 }