@Before public void setUp() throws Exception { PHPCoreTests.waitForIndexer(); PHPCoreTests.waitForAutoBuild(); project1 = FileUtils.createProject("project1"); IFolder folder = project1.getFolder("src"); if (!folder.exists()) { folder.create(true, true, new NullProgressMonitor()); } file = folder.getFile("test23.php"); InputStream source = new ByteArrayInputStream( "<?php class Item { public $title;} class ItemEx extends Item{public $title;} $a=new ItemEx(); $a->title;?>" .getBytes()); if (!file.exists()) { file.create(source, true, new NullProgressMonitor()); } else { file.setContents(source, IFile.FORCE, new NullProgressMonitor()); } PHPCoreTests.waitForIndexer(); PHPCoreTests.waitForAutoBuild(); }
@Before public void setUp() throws Exception { System.setProperty("disableStartupRunner", "true"); PHPCoreTests.waitForIndexer(); PHPCoreTests.waitForAutoBuild(); project1 = FileUtils.createProject("project1", PHPVersion.PHP5_3); IFolder folder = project1.getFolder("src"); if (!folder.exists()) { folder.create(true, true, new NullProgressMonitor()); } file = folder.getFile("test00294081.php"); InputStream source = new ByteArrayInputStream( "<?php class MyClass{const constant = 'constant value';function showCons1tant() {echo self::constant;}}$class = new MyClass ();$class->showConstant ();echo $class::constant;?>" .getBytes()); if (!file.exists()) { file.create(source, true, new NullProgressMonitor()); } else { file.setContents(source, IFile.FORCE, new NullProgressMonitor()); } PHPCoreTests.waitForIndexer(); PHPCoreTests.waitForAutoBuild(); }