Skip to content

Commit aba0afe

Browse files
committed
Refactored package to use PHPUnit 6 and namespaces (closes #20)
1 parent 392d7e1 commit aba0afe

11 files changed

+256
-1737
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
*.sublime-*
33
**/vendor/*
44
coverage/*
5+
composer.lock

.travis.yml

-8
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@ language: php
33
matrix:
44
fast_finish: true
55
include:
6-
- php: 5.3
7-
- env: COMPOSER_FLAGS="--prefer-lowest"
8-
php: 5.3
9-
- php: 5.4
10-
- php: 5.5
11-
- php: 5.6
12-
- env: COMPOSER_FLAGS="--prefer-lowest"
13-
php: 5.6
146
- php: 7.0
157
- php: 7.1
168
- env: COMPOSER_FLAGS="--prefer-lowest"

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Version 3.0
2+
3+
- Bumped requirements: now the package requires PHPUnit 6.2 and PHP 7.0. No new features were added to this version.

PHPUnit/Util/Log/VCR.php

-206
This file was deleted.

README.md

+12-25
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
PHPUnit Testlistener for PHP-VCR
2-
================================
1+
# PHPUnit Testlistener for PHP-VCR
32

43
Integrates PHPUnit with [PHP-VCR](http://github.com/php-vcr/php-vcr) using annotations.
54

@@ -11,8 +10,11 @@ Use `@vcr cassette_name` on your tests to turn VCR automatically on and off.
1110

1211
## Usage example
1312

14-
```php
15-
class VCRTest extends \PHPUnit_Framework_TestCase
13+
``` php
14+
15+
use PHPUnit\Framework\TestCase;
16+
17+
class VCRTest extends TestCase
1618
{
1719
/**
1820
* @vcr unittest_annotation_test
@@ -30,30 +32,30 @@ class VCRTest extends \PHPUnit_Framework_TestCase
3032

3133
1) Install using composer:
3234

33-
```sh
35+
``` sh
3436
composer require --dev php-vcr/phpunit-testlistener-vcr
3537
```
3638

3739
2) Add listener to your `phpunit.xml`:
3840

39-
```yml
41+
``` xml
4042
<listeners>
41-
<listener class="PHPUnit_Util_Log_VCR" file="vendor/php-vcr/phpunit-testlistener-vcr/PHPUnit/Util/Log/VCR.php" />
43+
<listener class="VCR\PHPUnit\TestListener\VCRTestListener" file="vendor/php-vcr/phpunit-testlistener-vcr/src/VCRTestListener.php" />
4244
</listeners>
4345
```
4446

4547
## Dependencies
4648

4749
PHPUnit-Testlistener-VCR depends on:
4850

49-
* PHP 5.3+
51+
* PHP 7.0+
5052
* [php-vcr/php-vcr](https://github.com/php-vcr/php-vcr)
5153

5254
## Run tests
5355

5456
In order to run all tests you need to get development dependencies using composer:
5557

56-
```php
58+
``` php
5759
composer install
5860
./vendor/bin/phpunit
5961
```
@@ -63,19 +65,4 @@ composer install
6365
**The changelog is manage at [PHPUnit testlistener for PHP-VCR releases page](https://github.com/php-vcr/phpunit-testlistener-vcr/releases).**
6466

6567
## Copyright
66-
Copyright (c) 2013-2016 Adrian Philipp. Released under the terms of the MIT license. See LICENSE for details.
67-
68-
<!--
69-
name of the projects and all sub-modules and libraries (sometimes they are named different and very confusing to new users)
70-
descriptions of all the project, and all sub-modules and libraries
71-
5-line code snippet on how its used (if it's a library)
72-
copyright and licensing information (or "Read LICENSE")
73-
instruction to grab the documentation
74-
instructions to install, configure, and to run the programs
75-
instruction to grab the latest code and detailed instructions to build it (or quick overview and "Read INSTALL")
76-
list of authors or "Read AUTHORS"
77-
instructions to submit bugs, feature requests, submit patches, join mailing list, get announcements, or join the user or dev community in other forms
78-
other contact info (email address, website, company name, address, etc)
79-
a brief history if it's a replacement or a fork of something else
80-
legal notices (crypto stuff)
81-
-->
68+
Copyright (c) 2013-2017 Adrian Philipp. Released under the terms of the MIT license. See LICENSE for details.

composer.json

+12-4
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,26 @@
22
"name": "php-vcr/phpunit-testlistener-vcr",
33
"description": "Integrates PHPUnit with PHP-VCR.",
44
"license": "MIT",
5-
65
"authors": [
76
{
87
"name": "Adrian Philipp",
98
"email": "mail@adrian-philipp.com"
109
}
1110
],
12-
11+
"autoload": {
12+
"psr-4": {
13+
"VCR\\PHPUnit\\TestListener\\": "src/"
14+
}
15+
},
16+
"autoload-dev": {
17+
"psr-4": {
18+
"Tests\\VCR\\PHPUnit\\TestListener\\": "tests/"
19+
}
20+
},
1321
"require": {
14-
"php-vcr/php-vcr": "^1.1.8"
22+
"php-vcr/php-vcr": "^1.3"
1523
},
1624
"require-dev": {
17-
"phpunit/phpunit": "^4.8|^5.0"
25+
"phpunit/phpunit": "^6.2"
1826
}
1927
}

0 commit comments

Comments
 (0)