// us to use one data set for this test method as well as
// testCreateInstance().
if ($plugin_id == 'arguments_no_constructor') {
- $this->setExpectedException('\ReflectionException');
+ if (method_exists($this, 'expectException')) {
+ $this->expectException('\ReflectionException');
+ }
+ else {
+ $this->setExpectedException('\ReflectionException');
+ }
}
// Finally invoke getInstanceArguments() on our mocked factory.