Skip to content
Permalink
Browse files

Merge branch 'release-1.0'

  • Loading branch information...
corpsee committed Apr 15, 2019
2 parents 40c47ec + e45da3f commit 9b7ddd8110c207492b9084637c4d68a3a031bcff
@@ -3,15 +3,16 @@
*.png binary
*.jpg binary

/.github/ export-ignore
/tests/ export-ignore
/docs/ export-ignore
/.github/ export-ignore
/tests/ export-ignore
/docs/ export-ignore

/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/.php-censor.yml export-ignore
/.codecov.yml export-ignore
/phpunit.xml export-ignore
/phpmd.xml export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/.php-censor.yml export-ignore
/.codecov.yml export-ignore
/phpunit.xml.dist export-ignore
/phpmd.xml.dist export-ignore
/.php_cs.dist export-ignore
@@ -10,7 +10,7 @@ setup:
test:
php_unit:
config:
- phpunit.xml
- phpunit.xml.dist
coverage: true

php_code_sniffer:
@@ -25,7 +25,7 @@ before_script:
- psql -c 'create database test_db;' -U postgres

script:
- vendor/bin/phpunit --configuration phpunit.xml --coverage-clover=coverage.xml
- vendor/bin/phpunit --configuration phpunit.xml.dist --coverage-clover=coverage.xml

after_success:
- bash <(curl -s https://codecov.io/bash)
@@ -258,14 +258,14 @@ cd /path/to/php-censor
```bash
cd /path/to/php-censor
./vendor/bin/phpunit --configuration ./phpunit.xml --coverage-html ./tests/runtime/coverage -vvv --colors=always
./vendor/bin/phpunit --configuration ./phpunit.xml.dist --coverage-html ./tests/runtime/coverage -vvv --colors=always
```

For Phar plugin tests set 'phar.readonly' setting to Off (0) in `php.ini` config. Otherwise tests will be skipped.

For database tests create empty 'test_db' database on 'localhost' with user/password: `root/<empty>`
for MySQL and with user/password: `postgres/<empty>` for PostgreSQL (You can change default test user, password and
database name in `phpunit.xml` config constants). If connection failed tests will be skipped.
database name in `phpunit.xml[.dist]` config constants). If connection failed tests will be skipped.

## Documentation

File renamed without changes.
File renamed without changes.
@@ -12,11 +12,11 @@ class PhpUnitTest extends \PHPUnit\Framework\TestCase
public function testSingleConfigFile()
{
$options = [
'config' => ROOT_DIR . 'phpunit.xml'
'config' => ROOT_DIR . 'phpunit.xml.dist'
];
$mockPlugin = $this->getPluginBuilder($options)->setMethods(['runConfig'])->getMock();
$mockPlugin->expects($this->once())->method('runConfig')->with(null, ROOT_DIR . 'phpunit.xml');
$mockPlugin->expects($this->once())->method('runConfig')->with(null, ROOT_DIR . 'phpunit.xml.dist');
$mockPlugin->execute();
}
@@ -96,7 +96,7 @@ public function testMultiDir()
public function testProcessResultsFromConfig()
{
$options = [
'config' => ROOT_DIR . 'phpunit.xml'
'config' => ROOT_DIR . 'phpunit.xml.dist'
];
$mockPlugin = $this->getPluginBuilder($options)->setMethods(['processResults'])->getMock();

0 comments on commit 9b7ddd8

Please sign in to comment.
You can’t perform that action at this time.