Skip to content

Commit 3133ff4

Browse files
committed
Move /tests/phpunit.xml.dist to /phpunit.xml.dist
Signed-off-by: Hidehito Nozawa <[email protected]>
1 parent 3233b10 commit 3133ff4

File tree

9 files changed

+56
-55
lines changed

9 files changed

+56
-55
lines changed

.gitignore

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
.idea/
2-
.phpmake
3-
.DS_Store
4-
vendor/
5-
composer.lock
1+
/.idea
2+
/vendor
3+
/composer.lock
4+
/tests/cover

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ install:
1919
- composer install --prefer-dist
2020

2121
script:
22-
- vendor/bin/phpunit --coverage-text --configuration tests/phpunit.xml.dist
22+
- vendor/bin/phpunit --coverage-text
2323

2424
cache:
2525
directories:
26-
- tests/vendor
2726
- $HOME/.composer/cache

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ The [`examples`](examples) directory contains usage examples for RSSWriter.
126126

127127
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).
128128

129+
## How to Test
130+
131+
```sh
132+
$ ./phpunit
133+
```
134+
129135
## License
130136

131137
MIT license

phpunit.xml.dist

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit
3+
bootstrap="tests/Bootstrap.php"
4+
processIsolation="false"
5+
verbose="true"
6+
strict="false"
7+
colors="true">
8+
<testsuites>
9+
<testsuite name="PHPUnit">
10+
<directory>tests</directory>
11+
</testsuite>
12+
</testsuites>
13+
14+
<logging>
15+
<log
16+
type="coverage-html"
17+
target="tests/cover"
18+
charset="UTF-8"
19+
yui="true"
20+
highlight="false"
21+
lowUpperBound="35"
22+
highLowerBound="70"/>
23+
</logging>
24+
25+
<filter>
26+
<whitelist>
27+
<directory suffix=".php">src</directory>
28+
<exclude>
29+
<directory suffix="Interface.php">src</directory>
30+
</exclude>
31+
</whitelist>
32+
<blacklist>
33+
<directory suffix=".php" group="PHPUNIT">vendor</directory>
34+
</blacklist>
35+
</filter>
36+
<listeners>
37+
<listener class="\Mockery\Adapter\Phpunit\TestListener"
38+
file="vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php"/>
39+
</listeners>
40+
</phpunit>

tests/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

tests/Bootstrap.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

33
// For composer
4-
require_once 'vendor/autoload.php';
4+
require_once __DIR__ . '/../vendor/autoload.php';
55

66
// Load test target classes
77
spl_autoload_register(function ($c) {
8-
@include_once strtr($c, '\\_', '//') . '.php';
8+
@include_once strtr($c, '\\_', '//') . '.php';
99
});
10-
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__DIR__) . '/src');
10+
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__DIR__) . '/src');

tests/Coverage/.gitkeep

Whitespace-only changes.

tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ $ composer.phar install
1919
Run phpunit:
2020

2121
```sh
22-
$ ./phpunit
22+
$ vendor/bin/phpunit phpunit.xml.dist
2323
```
2424

2525
## View Reports
2626

27-
If you want to see code coverages, open Coverage/index.html.
27+
If you want to see code coverages, open Coverage/index.html.

tests/phpunit.xml.dist

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)