], []), $node);
}
- /**
- * @expectedException \LogicException
- * @expectedExceptionMessage Cannot add statements to an abstract method
- */
public function testAddStmtToAbstractMethodError() {
+ $this->expectException(\LogicException::class);
+ $this->expectExceptionMessage('Cannot add statements to an abstract method');
$this->createMethodBuilder('test')
->makeAbstract()
->addStmt(new Print_(new String_('test')))
;
}
- /**
- * @expectedException \LogicException
- * @expectedExceptionMessage Cannot make method with statements abstract
- */
public function testMakeMethodWithStmtsAbstractError() {
+ $this->expectException(\LogicException::class);
+ $this->expectExceptionMessage('Cannot make method with statements abstract');
$this->createMethodBuilder('test')
->addStmt(new Print_(new String_('test')))
->makeAbstract()
;
}
- /**
- * @expectedException \LogicException
- * @expectedExceptionMessage Expected parameter node, got "Name"
- */
public function testInvalidParamError() {
+ $this->expectException(\LogicException::class);
+ $this->expectExceptionMessage('Expected parameter node, got "Name"');
$this->createMethodBuilder('test')
->addParam(new Node\Name('foo'))
;