Skip to content

Commit

Permalink
Move /tests/phpunit.xml.dist to /phpunit.xml.dist
Browse files Browse the repository at this point in the history
Signed-off-by: Hidehito Nozawa <[email protected]>
  • Loading branch information
suin committed Jul 21, 2016
1 parent 3233b10 commit 3133ff4
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 55 deletions.
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.idea/
.phpmake
.DS_Store
vendor/
composer.lock
/.idea
/vendor
/composer.lock
/tests/cover
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ install:
- composer install --prefer-dist

script:
- vendor/bin/phpunit --coverage-text --configuration tests/phpunit.xml.dist
- vendor/bin/phpunit --coverage-text

cache:
directories:
- tests/vendor
- $HOME/.composer/cache
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ The [`examples`](examples) directory contains usage examples for RSSWriter.

If you want to know APIs, please see [`FeedInterface`](src/Suin/RSSWriter/FeedInterface.php), [`ChannelInterface`](src/Suin/RSSWriter/ChannelInterface.php) and [`ItemInterface`](src/Suin/RSSWriter/ItemInterface.php).

## How to Test

```sh
$ ./phpunit
```

## License

MIT license
40 changes: 40 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
bootstrap="tests/Bootstrap.php"
processIsolation="false"
verbose="true"
strict="false"
colors="true">
<testsuites>
<testsuite name="PHPUnit">
<directory>tests</directory>
</testsuite>
</testsuites>

<logging>
<log
type="coverage-html"
target="tests/cover"
charset="UTF-8"
yui="true"
highlight="false"
lowUpperBound="35"
highLowerBound="70"/>
</logging>

<filter>
<whitelist>
<directory suffix=".php">src</directory>
<exclude>
<directory suffix="Interface.php">src</directory>
</exclude>
</whitelist>
<blacklist>
<directory suffix=".php" group="PHPUNIT">vendor</directory>
</blacklist>
</filter>
<listeners>
<listener class="\Mockery\Adapter\Phpunit\TestListener"
file="vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php"/>
</listeners>
</phpunit>
3 changes: 0 additions & 3 deletions tests/.gitignore

This file was deleted.

6 changes: 3 additions & 3 deletions tests/Bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

// For composer
require_once 'vendor/autoload.php';
require_once __DIR__ . '/../vendor/autoload.php';

// Load test target classes
spl_autoload_register(function ($c) {
@include_once strtr($c, '\\_', '//') . '.php';
@include_once strtr($c, '\\_', '//') . '.php';
});
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__DIR__) . '/src');
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__DIR__) . '/src');
Empty file removed tests/Coverage/.gitkeep
Empty file.
4 changes: 2 additions & 2 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ $ composer.phar install
Run phpunit:

```sh
$ ./phpunit
$ vendor/bin/phpunit phpunit.xml.dist
```

## View Reports

If you want to see code coverages, open Coverage/index.html.
If you want to see code coverages, open Coverage/index.html.
40 changes: 0 additions & 40 deletions tests/phpunit.xml.dist

This file was deleted.

0 comments on commit 3133ff4

Please sign in to comment.