Skip to content

Commit

Permalink
Merge branch 'release-1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
corpsee committed Apr 15, 2019
2 parents 40c47ec + e45da3f commit 9b7ddd8
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 18 deletions.
23 changes: 12 additions & 11 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .php-censor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ setup:
test:
php_unit:
config:
- phpunit.xml
- phpunit.xml.dist
coverage: true

php_code_sniffer:
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions tests/src/Plugin/PhpUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 9b7ddd8

Please sign in to comment.