/** * Add when expression * * @param string|ExpressionInterface $expression * @param string|ExpressionInterface $thenExpression * * @return $this */ public function when($expression, $thenExpression) { $this->whenThenExpressions[] = ['WHEN' => $expression, 'THEN' => $thenExpression]; if ($expression instanceof ExpressionInterface) { $this->pushParams($expression->getParams()); } if ($thenExpression instanceof ExpressionInterface) { $this->pushParams($thenExpression->getParams()); } return $this; }
public function assertExpr($compiled, ExpressionInterface $expr) { $this->assertSame($compiled, $expr->compile(Mock::getMysqliDriver($this))); }