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