芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/public_html/fmd/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php
createTraitBuilder('TestTrait') ->setDocComment('/** Nice trait */') ->addStmt($method1) ->addStmts([$method2, $method3]) ->addStmt($prop) ->addStmt($use) ->getNode(); $this->assertEquals(new Stmt\Trait_('TestTrait', [ 'stmts' => [$use, $prop, $method1, $method2, $method3] ], [ 'comments' => [ new Comment\Doc('/** Nice trait */') ] ]), $trait); } /** * @expectedException \LogicException * @expectedExceptionMessage Unexpected node of type "Stmt_Echo" */ public function testInvalidStmtError() { $this->createTraitBuilder('Test') ->addStmt(new Stmt\Echo_(array())) ; } }