When\When::bysetpos PHP Method

bysetpos() public method

public bysetpos ( $bysplist, $delimiter = "," )
    public function bysetpos($bysplist, $delimiter = ",")
    {
        if ($this->bysetpos = self::prepareItemsList($bysplist, $delimiter, 'setPosDay')) {
            return $this;
        }
        throw new \InvalidArgumentException("bysetpos: Accepts positive and negative values between 1 and 366");
    }

Usage Example

示例#1
0
 /**
  * @expectedException InvalidArgumentException
  */
 public function testInvalidBySetPos()
 {
     $test = new When();
     $test->bysetpos(367);
 }