When\When::bysecond PHP Method

bysecond() public method

public bysecond ( $seconds, $delimiter = "," )
    public function bysecond($seconds, $delimiter = ",")
    {
        if ($this->byseconds = self::prepareItemsList($seconds, $delimiter, 'second')) {
            return $this;
        }
        throw new \InvalidArgumentException("bysecond: Accepts numeric values between 0 and 60");
    }

Usage Example

示例#1
0
 /**
  * @expectedException InvalidArgumentException
  */
 public function testInvalidBySecondTwo()
 {
     $test = new When();
     $test->bysecond('-1, -2');
 }