Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / nikic / php-parser / test / PhpParser / Builder / ClassTest.php
index fe324d766ca9f1846ebc8472d2433df43f2876b8..27d911b0e0084c0a32567f22afa4c19dfa46e78b 100644 (file)
@@ -123,39 +123,31 @@ DOC;
         );
     }
 
-    /**
-     * @expectedException \LogicException
-     * @expectedExceptionMessage Unexpected node of type "Stmt_Echo"
-     */
     public function testInvalidStmtError() {
+        $this->expectException(\LogicException::class);
+        $this->expectExceptionMessage('Unexpected node of type "Stmt_Echo"');
         $this->createClassBuilder('Test')
             ->addStmt(new Stmt\Echo_([]))
         ;
     }
 
-    /**
-     * @expectedException \LogicException
-     * @expectedExceptionMessage Doc comment must be a string or an instance of PhpParser\Comment\Doc
-     */
     public function testInvalidDocComment() {
+        $this->expectException(\LogicException::class);
+        $this->expectExceptionMessage('Doc comment must be a string or an instance of PhpParser\Comment\Doc');
         $this->createClassBuilder('Test')
             ->setDocComment(new Comment('Test'));
     }
 
-    /**
-     * @expectedException \LogicException
-     * @expectedExceptionMessage Name cannot be empty
-     */
     public function testEmptyName() {
+        $this->expectException(\LogicException::class);
+        $this->expectExceptionMessage('Name cannot be empty');
         $this->createClassBuilder('Test')
             ->extend('');
     }
 
-    /**
-     * @expectedException \LogicException
-     * @expectedExceptionMessage Name must be a string or an instance of Node\Name
-     */
     public function testInvalidName() {
+        $this->expectException(\LogicException::class);
+        $this->expectExceptionMessage('Name must be a string or an instance of Node\Name');
         $this->createClassBuilder('Test')
             ->extend(['Foo']);
     }