When\When::wkst PHP Method

wkst() public method

public wkst ( $weekDay )
    public function wkst($weekDay)
    {
        if (Valid::weekDay($weekDay)) {
            $this->wkst = strtolower($weekDay);
            return $this;
        }
        throw new \InvalidArgumentException("wkst: Accepts " . rtrim(implode(Valid::$weekDays, ", "), ","));
    }

Usage Example

コード例 #1
0
 /**
  * @expectedException InvalidArgumentException
  */
 public function testInvalidWkst()
 {
     $test = new When();
     $test->wkst('va');
 }