Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / nikic / php-parser / test / PhpParser / Node / Stmt / PropertyTest.php
index bcfc0c6bd70fd9621b402d413ab848ceb71d0bb4..39387f96fd6e582415ba9b8bc5ada975b24b7c0a 100644 (file)
@@ -1,8 +1,10 @@
-<?php
+<?php declare(strict_types=1);
 
 namespace PhpParser\Node\Stmt;
 
-class PropertyTest extends \PHPUnit_Framework_TestCase
+use PHPUnit\Framework\TestCase;
+
+class PropertyTest extends TestCase
 {
     /**
      * @dataProvider provideModifiers
@@ -10,14 +12,14 @@ class PropertyTest extends \PHPUnit_Framework_TestCase
     public function testModifiers($modifier) {
         $node = new Property(
             constant('PhpParser\Node\Stmt\Class_::MODIFIER_' . strtoupper($modifier)),
-            array() // invalid
+            [] // invalid
         );
 
         $this->assertTrue($node->{'is' . $modifier}());
     }
 
     public function testNoModifiers() {
-        $node = new Property(0, array());
+        $node = new Property(0, []);
 
         $this->assertTrue($node->isPublic());
         $this->assertFalse($node->isProtected());
@@ -26,7 +28,7 @@ class PropertyTest extends \PHPUnit_Framework_TestCase
     }
 
     public function testStaticImplicitlyPublic() {
-        $node = new Property(Class_::MODIFIER_STATIC, array());
+        $node = new Property(Class_::MODIFIER_STATIC, []);
         $this->assertTrue($node->isPublic());
         $this->assertFalse($node->isProtected());
         $this->assertFalse($node->isPrivate());
@@ -34,11 +36,11 @@ class PropertyTest extends \PHPUnit_Framework_TestCase
     }
 
     public function provideModifiers() {
-        return array(
-            array('public'),
-            array('protected'),
-            array('private'),
-            array('static'),
-        );
+        return [
+            ['public'],
+            ['protected'],
+            ['private'],
+            ['static'],
+        ];
     }
 }