$this->assertSame($this->canonicalize($expected), $this->canonicalize($dump));
}
- /**
- * @expectedException \InvalidArgumentException
- * @expectedExceptionMessage Can only dump nodes and arrays.
- */
public function testError() {
+ $this->expectException(\InvalidArgumentException::class);
+ $this->expectExceptionMessage('Can only dump nodes and arrays.');
$dumper = new NodeDumper;
$dumper->dump(new \stdClass);
}