Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Commit

Permalink
add phpunit.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
rez1dent3 committed Dec 30, 2016
1 parent 5b1c6a4 commit 48b7bb6
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 6 deletions.
24 changes: 24 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
engines:
duplication:
enabled: true
config:
languages:
- ruby
- javascript
- python
- php
fixme:
enabled: true
phpmd:
enabled: true
ratings:
paths:
- "**.inc"
- "**.js"
- "**.jsx"
- "**.module"
- "**.php"
- "**.py"
- "**.rb"
exclude_paths:
- tests/*
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
composer.phar
composer.lock
/vendor/
.idea/
*.lock
build/
15 changes: 12 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
language: php
php:
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- hhvm
- nightly

before_script:
- "composer require codeclimate/php-test-reporter --dev"
- "composer install"

script:
- "phpunit --coverage-text --coverage-clover build/logs/clover.xml"

after_script:
- CODECLIMATE_REPO_TOKEN="4e543b308df41a23260a0dde9e178c2a8eb7bea7561917dd13b51df342c2665c" vendor/bin/test-reporter --stdout > codeclimate.json
- "sh -c 'if [ \"$TRAVIS_PHP_VERSION\" != \"hhvm\" ]; then curl -X POST -d @codeclimate.json -H \"Content-Type: application/json\" -H \"User-Agent: Code Climate (PHP Test Reporter v0.1.1)\" https://codeclimate.com/test_reports ; fi'"

addons:
code_climate:
repo_token: 16f6bab8e283b343f3afe457dc6863a4ec79999506aa8bb77addcf7d96930e87
repo_token: 4e543b308df41a23260a0dde9e178c2a8eb7bea7561917dd13b51df342c2665c
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@
],
"require": {
"php": "^5.5 || ^7.0",
"ext-mbstring": "*",
"doctrine/inflector": "~1.0"
},
"require-dev": {
"phpunit/phpunit": "~5.7",
"codeclimate/php-test-reporter": "dev-master"
},
"autoload": {
"psr-4": {
"Deimos\\": "src/"
}
}
}
}
23 changes: 23 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<phpunit bootstrap="tests/bootstrap.php">

<testsuites>
<testsuite name="Query">
<directory>tests/Test/Query</directory>
</testsuite>
</testsuites>

<filter>
<whitelist
addUncoveredFilesFromWhitelist="true"
processUncoveredFilesFromWhitelist="true">

<directory suffix=".php">./src/ORM/</directory>
</whitelist>
</filter>

<logging>
<log type="coverage-html" target="./build/html/"/>
<log type="coverage-clover" target="./build/logs/clover.xml"/>
</logging>

</phpunit>
8 changes: 8 additions & 0 deletions tests/Test/Query/BuildTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace Test\Query\BuildTest;

class Test extends \PHPUnit
{

}

0 comments on commit 48b7bb6

Please sign in to comment.