Mercurial > hg > isophonics-drupal-site
annotate vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 129ea1e6d783 |
children |
rev | line source |
---|---|
Chris@13 | 1 <?php declare(strict_types=1); |
Chris@0 | 2 |
Chris@0 | 3 namespace PhpParser\Node\Stmt; |
Chris@0 | 4 |
Chris@0 | 5 use PhpParser\Node; |
Chris@0 | 6 |
Chris@17 | 7 class InterfaceTest extends \PHPUnit\Framework\TestCase |
Chris@0 | 8 { |
Chris@0 | 9 public function testGetMethods() { |
Chris@13 | 10 $methods = [ |
Chris@0 | 11 new ClassMethod('foo'), |
Chris@0 | 12 new ClassMethod('bar'), |
Chris@13 | 13 ]; |
Chris@13 | 14 $interface = new Class_('Foo', [ |
Chris@13 | 15 'stmts' => [ |
Chris@13 | 16 new Node\Stmt\ClassConst([new Node\Const_('C1', new Node\Scalar\String_('C1'))]), |
Chris@0 | 17 $methods[0], |
Chris@13 | 18 new Node\Stmt\ClassConst([new Node\Const_('C2', new Node\Scalar\String_('C2'))]), |
Chris@0 | 19 $methods[1], |
Chris@13 | 20 new Node\Stmt\ClassConst([new Node\Const_('C3', new Node\Scalar\String_('C3'))]), |
Chris@13 | 21 ] |
Chris@13 | 22 ]); |
Chris@0 | 23 |
Chris@0 | 24 $this->assertSame($methods, $interface->getMethods()); |
Chris@0 | 25 } |
Chris@0 | 26 } |