Ejemplo n.º 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('')));
 }
Ejemplo n.º 2
0
 /**
  * @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))));
 }