Skip to content

Refactored package to use PHPUnit 6 and namespaces (closes #20) #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.sublime-*
**/vendor/*
coverage/*
composer.lock
8 changes: 0 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@ language: php
matrix:
fast_finish: true
include:
- php: 5.3
- env: COMPOSER_FLAGS="--prefer-lowest"
php: 5.3
- php: 5.4
- php: 5.5
- php: 5.6
- env: COMPOSER_FLAGS="--prefer-lowest"
php: 5.6
- php: 7.0
- php: 7.1
- env: COMPOSER_FLAGS="--prefer-lowest"
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Version 3.0

- Bumped requirements: now the package requires PHPUnit 6.2 and PHP 7.0. No new features were added to this version.
206 changes: 0 additions & 206 deletions PHPUnit/Util/Log/VCR.php

This file was deleted.

37 changes: 12 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
PHPUnit Testlistener for PHP-VCR
================================
# PHPUnit Testlistener for PHP-VCR

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

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

## Usage example

```php
class VCRTest extends \PHPUnit_Framework_TestCase
``` php

use PHPUnit\Framework\TestCase;

class VCRTest extends TestCase
{
/**
* @vcr unittest_annotation_test
Expand All @@ -30,30 +32,30 @@ class VCRTest extends \PHPUnit_Framework_TestCase

1) Install using composer:

```sh
``` sh
composer require --dev php-vcr/phpunit-testlistener-vcr
```

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

```yml
``` xml
<listeners>
<listener class="PHPUnit_Util_Log_VCR" file="vendor/php-vcr/phpunit-testlistener-vcr/PHPUnit/Util/Log/VCR.php" />
<listener class="VCR\PHPUnit\TestListener\VCRTestListener" file="vendor/php-vcr/phpunit-testlistener-vcr/src/VCRTestListener.php" />
</listeners>
```

## Dependencies

PHPUnit-Testlistener-VCR depends on:

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

## Run tests

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

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

## Copyright
Copyright (c) 2013-2016 Adrian Philipp. Released under the terms of the MIT license. See LICENSE for details.

<!--
name of the projects and all sub-modules and libraries (sometimes they are named different and very confusing to new users)
descriptions of all the project, and all sub-modules and libraries
5-line code snippet on how its used (if it's a library)
copyright and licensing information (or "Read LICENSE")
instruction to grab the documentation
instructions to install, configure, and to run the programs
instruction to grab the latest code and detailed instructions to build it (or quick overview and "Read INSTALL")
list of authors or "Read AUTHORS"
instructions to submit bugs, feature requests, submit patches, join mailing list, get announcements, or join the user or dev community in other forms
other contact info (email address, website, company name, address, etc)
a brief history if it's a replacement or a fork of something else
legal notices (crypto stuff)
-->
Copyright (c) 2013-2017 Adrian Philipp. Released under the terms of the MIT license. See LICENSE for details.
16 changes: 12 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,26 @@
"name": "php-vcr/phpunit-testlistener-vcr",
"description": "Integrates PHPUnit with PHP-VCR.",
"license": "MIT",

"authors": [
{
"name": "Adrian Philipp",
"email": "mail@adrian-philipp.com"
}
],

"autoload": {
"psr-4": {
"VCR\\PHPUnit\\TestListener\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\VCR\\PHPUnit\\TestListener\\": "tests/"
}
},
"require": {
"php-vcr/php-vcr": "^1.1.8"
"php-vcr/php-vcr": "^1.3"
},
"require-dev": {
"phpunit/phpunit": "^4.8|^5.0"
"phpunit/phpunit": "^6.2"
}
}
Loading