forked from eclipse-che/che
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge Bartlomiej Laczkowski PhpUnit testing PR (eclipse-che#5468)
* Initial support for PHPUnit testing. Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com> * Added improvements for exceptions handling and presentation model. Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com> * Improved test results presentation model and tests execution rules. Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com> * Small fixup after merge with master. Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com> * Added combined printer file that conforms different PHPUnit versions. Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com> * Fixed possible NPE issue while opening PHPUnit test case source file. Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com> * Bump up PHPUnit plug-ins version to 5.12.0. * Small fixup after merge with master. Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com> * Format code to be in line with Che code conventions. Signed-off-by: Bartlomiej Laczkowski <bartlomiej.l@zend.com> * Small fix, add debugId Signed-off-by: Vitalii Parfonov <vparfonov@codenvy.com>
- Loading branch information
Showing
74 changed files
with
4,522 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
plugins/plugin-testing-php/plugin-testing-phpunit/che-plugin-testing-phpunit-ide/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2012-2017 Codenvy, S.A. | ||
All rights reserved. This program and the accompanying materials | ||
are made available under the terms of the Eclipse Public License v1.0 | ||
which accompanies this distribution, and is available at | ||
http://www.eclipse.org/legal/epl-v10.html | ||
Contributors: | ||
Rogue Wave Software, Inc. - initial API and implementation | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<artifactId>che-plugin-testing-phpunit</artifactId> | ||
<groupId>org.eclipse.che.plugin</groupId> | ||
<version>5.14.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>che-plugin-testing-phpunit-ide</artifactId> | ||
<name>Che Plugin :: PHP Testing :: PHPUnit IDE</name> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.google.inject</groupId> | ||
<artifactId>guice</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.validation</groupId> | ||
<artifactId>validation-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.che.core</groupId> | ||
<artifactId>che-core-commons-gwt</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.che.core</groupId> | ||
<artifactId>che-core-ide-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.che.core</groupId> | ||
<artifactId>che-core-ide-app</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.che.plugin</groupId> | ||
<artifactId>che-plugin-testing-ide</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.vectomatic</groupId> | ||
<artifactId>lib-gwt-svg</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.gwt</groupId> | ||
<artifactId>gwt-user</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.gwt.inject</groupId> | ||
<artifactId>gin</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<resources> | ||
<resource> | ||
<directory>src/main/java</directory> | ||
<includes> | ||
<include>**/*.java</include> | ||
</includes> | ||
</resource> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
</resource> | ||
</resources> | ||
</build> | ||
</project> |
30 changes: 30 additions & 0 deletions
30
...hpunit-ide/src/main/java/org/eclipse/che/plugin/testing/phpunit/ide/PHPUnitGinModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2016 Rogue Wave Software, Inc. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Rogue Wave Software, Inc. - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.che.plugin.testing.phpunit.ide; | ||
|
||
import org.eclipse.che.ide.api.extension.ExtensionGinModule; | ||
import org.eclipse.che.plugin.testing.ide.TestAction; | ||
|
||
import com.google.gwt.inject.client.AbstractGinModule; | ||
import com.google.gwt.inject.client.multibindings.GinMultibinder; | ||
|
||
/** | ||
* PHPUnit Gin module. | ||
* | ||
* @author Bartlomiej Laczkowski | ||
*/ | ||
@ExtensionGinModule | ||
public class PHPUnitGinModule extends AbstractGinModule { | ||
@Override | ||
protected void configure() { | ||
GinMultibinder.newSetBinder(binder(), TestAction.class).addBinding().to(PHPUnitTestActionGroup.class); | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
...-ide/src/main/java/org/eclipse/che/plugin/testing/phpunit/ide/PHPUnitTestActionGroup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2016 Rogue Wave Software, Inc. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Rogue Wave Software, Inc. - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.che.plugin.testing.phpunit.ide; | ||
|
||
import org.eclipse.che.ide.api.action.Action; | ||
import org.eclipse.che.ide.api.action.ActionManager; | ||
import org.eclipse.che.ide.api.action.DefaultActionGroup; | ||
import org.eclipse.che.ide.api.keybinding.KeyBindingAgent; | ||
import org.eclipse.che.plugin.testing.ide.TestAction; | ||
import org.eclipse.che.plugin.testing.phpunit.ide.action.PHPRunContainerTestAction; | ||
import org.eclipse.che.plugin.testing.phpunit.ide.action.PHPRunScriptTestAction; | ||
import org.eclipse.che.plugin.testing.phpunit.ide.action.PHPRunScriptTestEditorAction; | ||
|
||
import com.google.inject.Inject; | ||
|
||
/** | ||
* PHPUnit test action implementation. | ||
* | ||
* @author Bartlomiej Laczkowski | ||
*/ | ||
public class PHPUnitTestActionGroup implements TestAction { | ||
|
||
private final Action runScriptTestAction; | ||
private final Action runScriptTestEditorAction; | ||
private final Action runContainerTestAction; | ||
|
||
@Inject | ||
public PHPUnitTestActionGroup(ActionManager actionManager, | ||
PHPRunScriptTestAction runScriptTestAction, | ||
PHPRunScriptTestEditorAction runScriptTestEditorAction, | ||
PHPRunContainerTestAction runContainerTestAction, | ||
KeyBindingAgent keyBinding) { | ||
actionManager.registerAction("PHPRunScriptTestAction", runScriptTestAction); | ||
actionManager.registerAction("PHPRunScriptTestEditorAction", runScriptTestEditorAction); | ||
actionManager.registerAction("PHPRunContainerTestAction", runContainerTestAction); | ||
this.runScriptTestAction = runScriptTestAction; | ||
this.runScriptTestEditorAction = runScriptTestEditorAction; | ||
this.runContainerTestAction = runContainerTestAction; | ||
} | ||
|
||
@Override | ||
public void addMainMenuItems(DefaultActionGroup testMainMenu) { | ||
testMainMenu.add(runScriptTestEditorAction); | ||
testMainMenu.add(runContainerTestAction); | ||
} | ||
|
||
@Override | ||
public void addContextMenuItems(DefaultActionGroup testContextMenu) { | ||
testContextMenu.add(runScriptTestAction); | ||
testContextMenu.add(runContainerTestAction); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...main/java/org/eclipse/che/plugin/testing/phpunit/ide/PHPUnitTestLocalizationConstant.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2016 Rogue Wave Software, Inc. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Rogue Wave Software, Inc. - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.che.plugin.testing.phpunit.ide; | ||
|
||
import com.google.gwt.i18n.client.Messages; | ||
|
||
/** | ||
* Localization constants. Interface to represent the constants defined in resource bundle: 'PHPUnitTestLocalizationConstant.properties'. | ||
* | ||
* @author Bartlomiej Laczkowski | ||
*/ | ||
public interface PHPUnitTestLocalizationConstant extends Messages { | ||
|
||
@Key("action.runScript.title") | ||
String actionRunScriptTitle(); | ||
|
||
@Key("action.runScript.description") | ||
String actionRunScriptDescription(); | ||
|
||
@Key("action.runContainer.title") | ||
String actionRunContainerTitle(); | ||
|
||
@Key("action.runContainer.description") | ||
String actionRunContainerDescription(); | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
...it-ide/src/main/java/org/eclipse/che/plugin/testing/phpunit/ide/PHPUnitTestResources.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2016 Rogue Wave Software, Inc. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Rogue Wave Software, Inc. - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.che.plugin.testing.phpunit.ide; | ||
|
||
import org.vectomatic.dom.svg.ui.SVGResource; | ||
|
||
import com.google.gwt.resources.client.ClientBundle; | ||
|
||
/** | ||
* PHPUnit ide part resources. | ||
* | ||
* @author Bartlomiej Laczkowski | ||
*/ | ||
public interface PHPUnitTestResources extends ClientBundle { | ||
|
||
@Source("org/eclipse/che/plugin/testing/phpunit/ide/svg/test.svg") | ||
SVGResource testIcon(); | ||
|
||
} |
Oops, something went wrong.