Skip to content

Commit

Permalink
Docker support
Browse files Browse the repository at this point in the history
  • Loading branch information
renandelmonico authored Jan 18, 2022
2 parents ad6394c + 4afa685 commit 63135b9
Show file tree
Hide file tree
Showing 12 changed files with 2,616 additions and 2,118 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# PHPUnit Test Explorer for Visual Studio Code
# PHP: Unit Test Explorer UI for Visual Studio Code

Run your PHPUnit tests in Node using the
Run your PHP tests using the
[Test Explorer UI](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-test-explorer).

![Screenshot](img/screenshot.png)

> This project is a fork from [recca0120/vscode-phpunit](https://github.com/recca0120/vscode-phpunit) ❤️
## Features

- Shows a Test Explorer in the Test view in VS Code's sidebar with all detected tests and suites and their state
Expand All @@ -14,12 +16,14 @@ Run your PHPUnit tests in Node using the
- Shows a failed test's log when the test is selected in the explorer
- Lets you choose test suites or individual tests in the explorer that should be run automatically after each file change
- Forwards the console output from PHPUnit to a VS Code output channel
- Run tests into the docker container

## Getting started

- Install the extension
- Restart VS Code and open the Test view
- Run your tests using the ![Run](img/run.png) icons in the Test Explorer or the CodeLenses in your test file
- For running tests on a docker container see the configuration
- For running phpunit on a remote system or using vagrant see Troubleshooting

## Configuration
Expand Down Expand Up @@ -67,6 +71,10 @@ To do this you need to configure the following settings:

You can also use the method above to execute on Docker remotely

`"phpunit.docker": true, ` this is to enable run the tests into the docker container

`"phpunit.dockerImage": "docker run --rm -v $(pwd):$(pwd) -w=$(pwd) php:8", ` this is to use the docker container to run the tests

### My `/usr/local/bin/vagrant` isn't found?

Spawn likely can't find vagrant locally. You need to switch to using your regular terminal using something like `"phpunit.shell": "/bin/bash",` or `"phpunit.shell": "/bin/zsh",`
Expand Down
690 changes: 170 additions & 520 deletions client/package-lock.json

Large diffs are not rendered by default.

24 changes: 13 additions & 11 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
{
"name": "lsp-phpunit-client",
"description": "VSCode part of a language server",
"author": "recca0120",
"author": "renandelmonico",
"license": "MIT",
"version": "0.0.1",
"publisher": "recca0120",
"publisher": "renandelmonico",
"contributors": [
"recca0120"
],
"repository": {
"type": "git",
"url": "https://github.com/recca0120/vscode-phpunit"
"url": "https://github.com/renandelmonico/vscode-phpunit"
},
"engines": {
"vscode": "^1.30.0"
},
"scripts": {
"update-vscode": "vscode-install",
"postinstall": "vscode-install"
"update-vscode": "vscode-install"
},
"dependencies": {
"md5": "^2.2.1",
"md5": "^2.3.0",
"vscode-languageclient": "^5.2.1",
"vscode-test-adapter-api": "^1.7.0",
"vscode-test-adapter-util": "^0.7.0"
"vscode-test-adapter-api": "^1.9.0",
"vscode-test-adapter-util": "^0.7.1"
},
"devDependencies": {
"@types/md5": "^2.1.33",
"diff": "^4.0.1",
"vscode": "^1.1.34"
"@types/md5": "^2.3.1",
"diff": "^4.0.2",
"vscode": "^1.1.37"
}
}
2 changes: 1 addition & 1 deletion client/tests/Notify.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Notify } from '../src/notify';
import { Notify } from '../src/Notify';

class StubNotify extends Notify {
public getResult() {
Expand Down
Loading

0 comments on commit 63135b9

Please sign in to comment.