public function testIncorrectInput() { // The input $source is neither a callback or a set of arrays $this->setExpectedException('MathPHP\\Exception\\BadDataException'); $x = 10; $incorrectFunction = $x ** 2 + 2 * $x + 1; Interpolation::getPoints($incorrectFunction, [0, 4, 5]); }