annotate vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php @ 2:92f882872392
Trusted hosts, + remove migration modules
author |
Chris Cannam |
date |
Tue, 05 Dec 2017 09:26:43 +0000 |
parents |
4c8ae668cc8c |
children |
5fb285c0d0e3 |
rev |
line source |
Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 namespace PhpParser\Node\Stmt;
|
Chris@0
|
4
|
Chris@0
|
5 use PhpParser\Node;
|
Chris@0
|
6
|
Chris@0
|
7 class InterfaceTest extends \PHPUnit_Framework_TestCase
|
Chris@0
|
8 {
|
Chris@0
|
9 public function testGetMethods() {
|
Chris@0
|
10 $methods = array(
|
Chris@0
|
11 new ClassMethod('foo'),
|
Chris@0
|
12 new ClassMethod('bar'),
|
Chris@0
|
13 );
|
Chris@0
|
14 $interface = new Class_('Foo', array(
|
Chris@0
|
15 'stmts' => array(
|
Chris@0
|
16 new Node\Stmt\ClassConst(array(new Node\Const_('C1', new Node\Scalar\String_('C1')))),
|
Chris@0
|
17 $methods[0],
|
Chris@0
|
18 new Node\Stmt\ClassConst(array(new Node\Const_('C2', new Node\Scalar\String_('C2')))),
|
Chris@0
|
19 $methods[1],
|
Chris@0
|
20 new Node\Stmt\ClassConst(array(new Node\Const_('C3', new Node\Scalar\String_('C3')))),
|
Chris@0
|
21 )
|
Chris@0
|
22 ));
|
Chris@0
|
23
|
Chris@0
|
24 $this->assertSame($methods, $interface->getMethods());
|
Chris@0
|
25 }
|
Chris@0
|
26 }
|