public function testGettersAndSetters() { $clause = new ValuesClause(); $field = new StringExpression(); $field->setValue('abc'); $null = new ValueExpression(); $this->assertFalse($clause->hasExpressions()); $clause->addExpression($field); $this->assertTrue($clause->hasExpressions()); $this->assertSame([$field], $clause->getExpressions()); $clause->clearExpressions(); $clause->setExpressions([$field, $null]); $this->assertTrue($clause->hasExpressions()); $clause->clearExpressions(); $this->assertFalse($clause->hasExpressions()); $this->setExpectedException("InvalidArgumentException"); $clause->setExpressions([$field, $null, 'abc']); }