diff vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php @ 13:5fb285c0d0e3

Update Drupal core to 8.4.7 via Composer. Security update; I *think* we've been lucky to get away with this so far, as we don't support self-registration which seems to be used by the so-called "drupalgeddon 2" attack that 8.4.5 was vulnerable to.
author Chris Cannam
date Mon, 23 Apr 2018 09:33:26 +0100
parents 4c8ae668cc8c
children 129ea1e6d783
line wrap: on
line diff
--- a/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php	Fri Feb 23 15:52:07 2018 +0000
+++ b/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php	Mon Apr 23 09:33:26 2018 +0100
@@ -1,12 +1,13 @@
-<?php
+<?php declare(strict_types=1);
 
 namespace PhpParser\Builder;
 
 use PhpParser\Comment;
 use PhpParser\Node\Name;
 use PhpParser\Node\Stmt;
+use PHPUnit\Framework\TestCase;
 
-class TraitTest extends \PHPUnit_Framework_TestCase
+class TraitTest extends TestCase
 {
     protected function createTraitBuilder($class) {
         return new Trait_($class);
@@ -16,9 +17,9 @@
         $method1 = new Stmt\ClassMethod('test1');
         $method2 = new Stmt\ClassMethod('test2');
         $method3 = new Stmt\ClassMethod('test3');
-        $prop = new Stmt\Property(Stmt\Class_::MODIFIER_PUBLIC, array(
+        $prop = new Stmt\Property(Stmt\Class_::MODIFIER_PUBLIC, [
             new Stmt\PropertyProperty('test')
-        ));
+        ]);
         $use = new Stmt\TraitUse([new Name('OtherTrait')]);
         $trait = $this->createTraitBuilder('TestTrait')
             ->setDocComment('/** Nice trait */')
@@ -42,7 +43,7 @@
      */
     public function testInvalidStmtError() {
         $this->createTraitBuilder('Test')
-            ->addStmt(new Stmt\Echo_(array()))
+            ->addStmt(new Stmt\Echo_([]))
         ;
     }
 }