Closed elliotchance closed 8 years ago
Methods that do not exist on TestCase cause bad things to happen, need to throw the appropriate exception like:
TestCase
public function __call($name, $args) { if ($name === '') { $name = '_'; } if (substr($name, 0, 6) !== 'assert' && substr($name, 0, 6) !== 'verify') { throw new \BadMethodCallException($name); } $verify = $name[0] === 'v'; $name = lcfirst(substr($name, 6)); if (count($args) > 1) { $builder = new AssertionBuilder($this, $args[0], $verify); /** @noinspection PhpUndefinedMethodInspection */ return $builder->$name($args[1]); } $builder = new AssertionBuilder($this, null, $verify); /** @noinspection PhpUndefinedMethodInspection */ return $builder->$name($args[0]); }
See #318
Methods that do not exist on
TestCase
cause bad things to happen, need to throw the appropriate exception like: