diff --git a/.gitattributes b/.gitattributes index fed922e..a48f10d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ +tests/ export-ignore .editorconfig export-ignore .gitattributes export-ignore .gitignore export-ignore @@ -5,3 +6,4 @@ .travis.yml export-ignore CONTRIBUTING.md export-ignore CONDUCT.md export-ignore +phpunit.xml.dist export-ignore diff --git a/.gitignore b/.gitignore index d6a14f7..e45d856 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build/ vendor/ composer.lock +phpunit.xml diff --git a/.travis.yml b/.travis.yml index 2a34ac2..11f46ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,9 @@ before_install: install: - travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction +before_script: + - vendor/bin/http_test_server > /dev/null 2>&1 & + script: - $TEST_COMMAND diff --git a/README.md b/README.md index 589ad87..c2749ad 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -# Boilerplate +# Boilerplate Adapter -[![Latest Version](https://img.shields.io/github/release/php-http/boilerplate.svg?style=flat-square)](https://github.com/php-http/boilerplate/releases) +[![Latest Version](https://img.shields.io/github/release/php-http/boilerplate-adapter.svg?style=flat-square)](https://github.com/php-http/boilerplate-adapter/releases) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) -[![Build Status](https://img.shields.io/travis/php-http/boilerplate.svg?style=flat-square)](https://travis-ci.org/php-http/boilerplate) -[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/boilerplate.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/boilerplate) -[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/boilerplate.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/boilerplate) -[![Total Downloads](https://img.shields.io/packagist/dt/php-http/boilerplate.svg?style=flat-square)](https://packagist.org/packages/php-http/boilerplate) +[![Build Status](https://img.shields.io/travis/php-http/boilerplate-adapter.svg?style=flat-square)](https://travis-ci.org/php-http/boilerplate-adapter) +[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/boilerplate-adapter.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/boilerplate-adapter) +[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/boilerplate-adapter.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/boilerplate-adapter) +[![Total Downloads](https://img.shields.io/packagist/dt/php-http/boilerplate-adapter.svg?style=flat-square)](https://packagist.org/packages/php-http/boilerplate-adapter) -**Boilerplate PHP HTTP library.** +**Boilerplate HTTP adapter.** ## Install @@ -15,7 +15,7 @@ Via Composer ``` bash -$ composer require php-http/boilerplate +$ composer require php-http/boilerplate-adapter ``` diff --git a/composer.json b/composer.json index 9ea39d9..44b9ebb 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { - "name": "php-http/boilerplate", - "description": "Boilerplate PHP HTTP library", + "name": "php-http/boilerplate-adapter", + "description": "Boilerplate HTTP Adapter description", "license": "MIT", - "keywords": ["boilerplate", "http"], + "keywords": ["boilerplate", "http", "adapter", "psr7"], "homepage": "http://php-http.org", "authors": [ { @@ -15,16 +15,28 @@ } ], "require": { - "php": ">=5.4" + "php": ">=5.4", + "php-http/adapter": "^0.1" + }, + "require-dev": { + "phpunit/phpunit": "^4.4" + }, + "provide": { + "php-http/adapter-implementation": "0.1" }, "autoload": { "psr-4": { - "Http\\Boilerplate\\": "src/" + "Http\\Adapter\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Http\\Adapter\\Tests\\": "tests/" } }, "scripts": { - "test": "", - "test-ci": "" + "test": "vendor/bin/phpunit", + "test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml" }, "extra": { "branch-alias": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..700eab3 --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,16 @@ + + + + + tests/ + + + + + + + + src/ + + +