comparison vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children 5fb285c0d0e3
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 namespace PhpParser\Node\Stmt;
4
5 use PhpParser\Node;
6
7 class InterfaceTest extends \PHPUnit_Framework_TestCase
8 {
9 public function testGetMethods() {
10 $methods = array(
11 new ClassMethod('foo'),
12 new ClassMethod('bar'),
13 );
14 $interface = new Class_('Foo', array(
15 'stmts' => array(
16 new Node\Stmt\ClassConst(array(new Node\Const_('C1', new Node\Scalar\String_('C1')))),
17 $methods[0],
18 new Node\Stmt\ClassConst(array(new Node\Const_('C2', new Node\Scalar\String_('C2')))),
19 $methods[1],
20 new Node\Stmt\ClassConst(array(new Node\Const_('C3', new Node\Scalar\String_('C3')))),
21 )
22 ));
23
24 $this->assertSame($methods, $interface->getMethods());
25 }
26 }