Mercurial > hg > isophonics-drupal-site
diff vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 5fb285c0d0e3 |
children |
line wrap: on
line diff
--- a/vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php Thu Feb 28 13:21:36 2019 +0000 @@ -8,9 +8,8 @@ use PhpParser\Node\Expr\Variable; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; -use PHPUnit\Framework\TestCase; -class MethodTest extends TestCase +class MethodTest extends \PHPUnit\Framework\TestCase { public function createMethodBuilder($name) { return new Method($name); @@ -135,33 +134,27 @@ ], []), $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')) ;