Skip to content

Commit

Permalink
Fixed configs.
Browse files Browse the repository at this point in the history
  • Loading branch information
corpsee committed Apr 15, 2019
1 parent 9f1d795 commit c2c28fc
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 18 deletions.
23 changes: 12 additions & 11 deletions .gitattributes
Expand Up @@ -3,15 +3,16 @@
*.png binary *.png binary
*.jpg binary *.jpg binary


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


/.editorconfig export-ignore /.editorconfig export-ignore
/.gitattributes export-ignore /.gitattributes export-ignore
/.gitignore export-ignore /.gitignore export-ignore
/.travis.yml export-ignore /.travis.yml export-ignore
/.php-censor.yml export-ignore /.php-censor.yml export-ignore
/.codecov.yml export-ignore /.codecov.yml export-ignore
/phpunit.xml export-ignore /phpunit.xml.dist export-ignore
/phpmd.xml export-ignore /phpmd.xml.dist export-ignore
/.php_cs.dist export-ignore
2 changes: 1 addition & 1 deletion .php-censor.yml
Expand Up @@ -10,7 +10,7 @@ setup:
test: test:
php_unit: php_unit:
config: config:
- phpunit.xml - phpunit.xml.dist
coverage: true coverage: true


php_code_sniffer: php_code_sniffer:
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -25,7 +25,7 @@ before_script:
- psql -c 'create database b8_test;' -U postgres - psql -c 'create database b8_test;' -U postgres


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


after_success: after_success:
- bash <(curl -s https://codecov.io/bash) - bash <(curl -s https://codecov.io/bash)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -247,14 +247,14 @@ cd /path/to/php-censor
```bash ```bash
cd /path/to/php-censor 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 Phar plugin tests set 'phar.readonly' setting to Off (0) in `php.ini` config. Otherwise tests will be skipped.


For database B8Framework tests create empty 'b8_test' database on 'localhost' with user/password: `root/<empty>` For database B8Framework tests create empty 'b8_test' 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 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 ## Documentation


Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions tests/src/Plugin/PhpUnitTest.php
Expand Up @@ -12,11 +12,11 @@ class PhpUnitTest extends \PHPUnit\Framework\TestCase
public function testSingleConfigFile() public function testSingleConfigFile()
{ {
$options = [ $options = [
'config' => ROOT_DIR . 'phpunit.xml' 'config' => ROOT_DIR . 'phpunit.xml.dist'
]; ];


$mockPlugin = $this->getPluginBuilder($options)->setMethods(['runConfig'])->getMock(); $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(); $mockPlugin->execute();
} }
Expand Down Expand Up @@ -96,7 +96,7 @@ public function testMultiDir()
public function testProcessResultsFromConfig() public function testProcessResultsFromConfig()
{ {
$options = [ $options = [
'config' => ROOT_DIR . 'phpunit.xml' 'config' => ROOT_DIR . 'phpunit.xml.dist'
]; ];


$mockPlugin = $this->getPluginBuilder($options)->setMethods(['processResults'])->getMock(); $mockPlugin = $this->getPluginBuilder($options)->setMethods(['processResults'])->getMock();
Expand Down

0 comments on commit c2c28fc

Please sign in to comment.