mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 01:31:45 +01:00
Tests > implement PHPUnit (instead of Codeception)
This commit is contained in:
7
.gitignore
vendored
7
.gitignore
vendored
@@ -23,6 +23,12 @@
|
||||
/phing/properties
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
### PHPUnit
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
/phpunit.xml
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
### PHP Coding Standards Fixer generated files
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
@@ -70,7 +76,6 @@
|
||||
### NetBeans template
|
||||
# ----------------------------------------------------------------------------------------------------------------------
|
||||
nbproject/private/
|
||||
build/
|
||||
nbbuild/
|
||||
dist/
|
||||
nbdist/
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
namespace: 'Meritoo\Common\Test'
|
||||
suites:
|
||||
unit:
|
||||
path: .
|
||||
settings:
|
||||
shuffle: true
|
||||
lint: true
|
||||
paths:
|
||||
tests: tests
|
||||
output: tests/_output
|
||||
support: tests/_support
|
||||
data: tests
|
||||
coverage:
|
||||
enabled: true
|
||||
include:
|
||||
- src/*
|
||||
exclude:
|
||||
- data/*
|
||||
- docker/*
|
||||
- phing/*
|
||||
- tests/*
|
||||
- vendor/*
|
||||
@@ -17,11 +17,11 @@
|
||||
"symfony/http-foundation": "^3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"codeception/codeception": "^2.4",
|
||||
"friendsofphp/php-cs-fixer": "^2.2",
|
||||
"pdepend/pdepend": "^2.5",
|
||||
"phploc/phploc": "^2.1",
|
||||
"phpmd/phpmd": "^2.6",
|
||||
"phpunit/phpunit": "^4.8",
|
||||
"sebastian/phpcpd": "^2.0",
|
||||
"squizlabs/php_codesniffer": "^2.9"
|
||||
},
|
||||
|
||||
@@ -76,6 +76,7 @@ dir.tests = ${project.basedir}/tests
|
||||
dir.build = ${project.basedir}/build
|
||||
dir.reports = ${dir.build}/logs
|
||||
dir.reports.pdepend = ${dir.reports}/pdepend
|
||||
dir.reports.coverage = ${dir.reports}/phpunit_coverage
|
||||
#
|
||||
# Disabled, because unnecessary right now
|
||||
# phpdocumentor/phpdocumentor cannot be installed via Composer
|
||||
@@ -98,7 +99,7 @@ dir.data.temporary = ${dir.data}/tmp
|
||||
|
||||
# Path of the framework used to run unit tests
|
||||
#
|
||||
tests.framework.path = ./vendor/bin/codecept
|
||||
tests.framework.path = ./vendor/bin/phpunit --verbose --no-coverage --testdox
|
||||
|
||||
# Path of the PHP Coding Standards Fixer (http://cs.sensiolabs.org)
|
||||
#
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
<!--<mkdir dir="${dir.docs.phpdoc2}" />-->
|
||||
<mkdir dir="${dir.reports}" />
|
||||
<mkdir dir="${dir.reports.pdepend}" />
|
||||
<mkdir dir="${dir.reports.coverage}"/>
|
||||
</target>
|
||||
|
||||
<!-- PHPDocumentor2 API documentation target -->
|
||||
@@ -213,7 +214,7 @@
|
||||
<!-- Unit tests -->
|
||||
<target name="test:unit" description="Executes unit tests">
|
||||
<echo msg="Running unit tests..." />
|
||||
<exec command="${tests.framework.path} run --silent" passthru="true"/>
|
||||
<exec command="${tests.framework.path}" passthru="true"/>
|
||||
</target>
|
||||
|
||||
<!-- Checkout and finalization -->
|
||||
|
||||
53
phpunit.xml.dist
Normal file
53
phpunit.xml.dist
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd"
|
||||
backupGlobals="true"
|
||||
backupStaticAttributes="false"
|
||||
bootstrap="./vendor/autoload.php"
|
||||
cacheTokens="false"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
forceCoversAnnotation="false"
|
||||
mapTestClassNameToCoveredClassName="false"
|
||||
processIsolation="false"
|
||||
stopOnError="false"
|
||||
stopOnFailure="false"
|
||||
stopOnIncomplete="false"
|
||||
stopOnSkipped="false"
|
||||
stopOnRisky="false"
|
||||
testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader"
|
||||
timeoutForSmallTests="1"
|
||||
timeoutForMediumTests="10"
|
||||
timeoutForLargeTests="60"
|
||||
verbose="true"
|
||||
>
|
||||
<php>
|
||||
<ini name="error_reporting" value="-1"/>
|
||||
</php>
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="Meritoo Package - Main Test Suite">
|
||||
<directory>./tests/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory>./src/</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
|
||||
<groups>
|
||||
<exclude>
|
||||
<group>performance</group>
|
||||
</exclude>
|
||||
</groups>
|
||||
|
||||
<logging>
|
||||
<log type="coverage-html" target="./build/logs/phpunit_coverage/html"/>
|
||||
</logging>
|
||||
</phpunit>
|
||||
2
tests/_output/.gitignore
vendored
2
tests/_output/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
||||
Reference in New Issue
Block a user