Apply NC => phpunit fix from new skeleton

This commit is contained in:
splitt3r 2017-10-09 18:34:48 +02:00
Родитель 19ecdc08a3
Коммит b58b40fbfa
2 изменённых файлов: 17 добавлений и 20 удалений

Просмотреть файл

@ -151,24 +151,7 @@ appstore:
--exclude="../$(app_name)/.*" \ --exclude="../$(app_name)/.*" \
--exclude="../$(app_name)/js/.*" \ --exclude="../$(app_name)/js/.*" \
# Command for running JS and PHP tests. Works for package.json files in the js/
# and root directory. If phpunit is not installed systemwide, a copy is fetched
# from the internet
.PHONY: test .PHONY: test
test: test: composer
ifneq (,$(wildcard $(CURDIR)/js/package.json)) $(CURDIR)/vendor/phpunit/phpunit/phpunit -c phpunit.xml
cd js && $(npm) run test $(CURDIR)/vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml
endif
ifneq (,$(wildcard $(CURDIR)/package.json))
$(npm) run test
endif
ifeq (, $(shell which phpunit 2> /dev/null))
@echo "No phpunit command available, downloading a copy from the web"
mkdir -p $(build_tools_directory)
curl -sSL https://phar.phpunit.de/phpunit.phar -o $(build_tools_directory)/phpunit.phar
php $(build_tools_directory)/phpunit.phar -c phpunit.xml
php $(build_tools_directory)/phpunit.phar -c phpunit.integration.xml
else
phpunit -c phpunit.xml --coverage-clover build/php-unit.clover
phpunit -c phpunit.integration.xml --coverage-clover build/php-unit.clover
endif

14
composer.json Normal file
Просмотреть файл

@ -0,0 +1,14 @@
{
"name": "polls",
"description": "This is a poll app, similar to doodle or dudle with the possibility for restrict access (only members, certain groups/users, hidden and public).",
"type": "project",
"license": "AGPL",
"authors": [
{
"name": "Vinzenz Rosenkranz"
}
],
"require-dev": {
"phpunit/phpunit": "^5.4"
}
}