1
- PHPUnit Testlistener for PHP-VCR
2
- ================================
1
+ # PHPUnit Testlistener for PHP-VCR
3
2
4
3
Integrates PHPUnit with [ PHP-VCR] ( http://github.com/php-vcr/php-vcr ) using annotations.
5
4
@@ -11,8 +10,11 @@ Use `@vcr cassette_name` on your tests to turn VCR automatically on and off.
11
10
12
11
## Usage example
13
12
14
- ``` php
15
- class VCRTest extends \PHPUnit_Framework_TestCase
13
+ ``` php
14
+
15
+ use PHPUnit\Framework\TestCase;
16
+
17
+ class VCRTest extends TestCase
16
18
{
17
19
/**
18
20
* @vcr unittest_annotation_test
@@ -30,30 +32,30 @@ class VCRTest extends \PHPUnit_Framework_TestCase
30
32
31
33
1 ) Install using composer:
32
34
33
- ``` sh
35
+ ``` sh
34
36
composer require --dev php-vcr/phpunit-testlistener-vcr
35
37
```
36
38
37
39
2 ) Add listener to your ` phpunit.xml ` :
38
40
39
- ``` yml
41
+ ``` xml
40
42
<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" />
42
44
</listeners >
43
45
```
44
46
45
47
## Dependencies
46
48
47
49
PHPUnit-Testlistener-VCR depends on:
48
50
49
- * PHP 5.3 +
51
+ * PHP 7.0 +
50
52
* [ php-vcr/php-vcr] ( https://github.com/php-vcr/php-vcr )
51
53
52
54
## Run tests
53
55
54
56
In order to run all tests you need to get development dependencies using composer:
55
57
56
- ``` php
58
+ ``` php
57
59
composer install
58
60
./vendor/bin/phpunit
59
61
```
@@ -63,19 +65,4 @@ composer install
63
65
** The changelog is manage at [ PHPUnit testlistener for PHP-VCR releases page] ( https://github.com/php-vcr/phpunit-testlistener-vcr/releases ) .**
64
66
65
67
## 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.
0 commit comments