Mercurial > hg > isophonics-drupal-site
comparison vendor/nikic/php-parser/test/PhpParser/Node/IdentifierTest.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 | |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
12:7a779792577d | 13:5fb285c0d0e3 |
---|---|
1 <?php declare(strict_types=1); | |
2 | |
3 namespace PhpParser\Node; | |
4 | |
5 use PHPUnit\Framework\TestCase; | |
6 | |
7 class IdentifierTest extends TestCase | |
8 { | |
9 public function testToString() { | |
10 $identifier = new Identifier('Foo'); | |
11 | |
12 $this->assertSame('Foo', (string) $identifier); | |
13 $this->assertSame('Foo', $identifier->toString()); | |
14 $this->assertSame('foo', $identifier->toLowerString()); | |
15 } | |
16 | |
17 /** @dataProvider provideTestIsSpecialClassName */ | |
18 public function testIsSpecialClassName($identifier, $expected) { | |
19 $identifier = new Identifier($identifier); | |
20 $this->assertSame($expected, $identifier->isSpecialClassName()); | |
21 } | |
22 | |
23 public function provideTestIsSpecialClassName() { | |
24 return [ | |
25 ['self', true], | |
26 ['PARENT', true], | |
27 ['Static', true], | |
28 ['other', false], | |
29 ]; | |
30 } | |
31 } |