Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / nikic / php-parser / test / PhpParser / Builder / MethodTest.php
index 0decbed0d7636a2438a6a1638a29814f0fbb9247..141967903dbb2834306439e465ce1cc90cf2256d 100644 (file)
@@ -135,33 +135,27 @@ class MethodTest extends TestCase
         ], []), $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'))
         ;