comparison vendor/nikic/php-parser/test/PhpParser/Node/Scalar/MagicConstTest.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
comparison
equal deleted inserted replaced
12:7a779792577d 13:5fb285c0d0e3
1 <?php 1 <?php declare(strict_types=1);
2 2
3 namespace PhpParser\Node\Scalar; 3 namespace PhpParser\Node\Scalar;
4 4
5 class MagicConstTest extends \PHPUnit_Framework_TestCase { 5 use PHPUnit\Framework\TestCase;
6
7 class MagicConstTest extends TestCase
8 {
6 /** 9 /**
7 * @dataProvider provideTestGetName 10 * @dataProvider provideTestGetName
8 */ 11 */
9 public function testGetName(MagicConst $magicConst, $name) { 12 public function testGetName(MagicConst $magicConst, $name) {
10 $this->assertSame($name, $magicConst->getName()); 13 $this->assertSame($name, $magicConst->getName());
11 } 14 }
12 15
13 public function provideTestGetName() { 16 public function provideTestGetName() {
14 return array( 17 return [
15 array(new MagicConst\Class_, '__CLASS__'), 18 [new MagicConst\Class_, '__CLASS__'],
16 array(new MagicConst\Dir, '__DIR__'), 19 [new MagicConst\Dir, '__DIR__'],
17 array(new MagicConst\File, '__FILE__'), 20 [new MagicConst\File, '__FILE__'],
18 array(new MagicConst\Function_, '__FUNCTION__'), 21 [new MagicConst\Function_, '__FUNCTION__'],
19 array(new MagicConst\Line, '__LINE__'), 22 [new MagicConst\Line, '__LINE__'],
20 array(new MagicConst\Method, '__METHOD__'), 23 [new MagicConst\Method, '__METHOD__'],
21 array(new MagicConst\Namespace_, '__NAMESPACE__'), 24 [new MagicConst\Namespace_, '__NAMESPACE__'],
22 array(new MagicConst\Trait_, '__TRAIT__'), 25 [new MagicConst\Trait_, '__TRAIT__'],
23 ); 26 ];
24 } 27 }
25 } 28 }