Add code coverage

This commit is contained in:
Phan An 2017-06-03 17:50:53 +01:00
parent 7d80f1d143
commit c93a33a4bc
3 changed files with 553 additions and 2 deletions

View file

@ -33,3 +33,10 @@ install:
script:
- phpunit
- yarn test
addons:
code_climate:
repo_token: e74dc85a4eeb025a067bde238175f44d9f6a9e544278c4c096a46b8467c5fb9f
after_success:
- vendor/bin/test-reporter

View file

@ -24,7 +24,8 @@
"facebook/webdriver": "^1.2",
"barryvdh/laravel-ide-helper": "^2.1",
"laravel/tinker": "^1.0",
"laravel/browser-kit-testing": "^1.0"
"laravel/browser-kit-testing": "^1.0",
"codeclimate/php-test-reporter": "^0.4.4"
},
"autoload": {
"classmap": [

545
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "b2aa59c478d7e97ce1a96c24405ca7c7",
"content-hash": "f57e1b0e6cecf80d68b7e8e95ecfb561",
"packages": [
{
"name": "aws/aws-sdk-php",
@ -2840,6 +2840,124 @@
],
"time": "2016-06-13T19:28:20+00:00"
},
{
"name": "codeclimate/php-test-reporter",
"version": "v0.4.4",
"source": {
"type": "git",
"url": "https://github.com/codeclimate/php-test-reporter.git",
"reference": "eab9ac233f23a4c12a12755793750f22fc46dd3e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/codeclimate/php-test-reporter/zipball/eab9ac233f23a4c12a12755793750f22fc46dd3e",
"reference": "eab9ac233f23a4c12a12755793750f22fc46dd3e",
"shasum": ""
},
"require": {
"ext-curl": "*",
"padraic/phar-updater": "^1.0",
"php": "^5.3 || ^7.0",
"psr/log": "^1.0",
"satooshi/php-coveralls": "^1.0",
"symfony/console": "^2.0 || ^3.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.0.0",
"phpunit/phpunit": "^4.8.31"
},
"bin": [
"composer/bin/test-reporter"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.3.x-dev"
}
},
"autoload": {
"psr-4": {
"CodeClimate\\PhpTestReporter\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Code Climate",
"email": "hello@codeclimate.com",
"homepage": "https://codeclimate.com"
}
],
"description": "PHP client for reporting test coverage to Code Climate",
"homepage": "https://github.com/codeclimate/php-test-reporter",
"keywords": [
"codeclimate",
"coverage"
],
"time": "2017-02-15T22:25:47+00:00"
},
{
"name": "composer/ca-bundle",
"version": "1.0.7",
"source": {
"type": "git",
"url": "https://github.com/composer/ca-bundle.git",
"reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/b17e6153cb7f33c7e44eb59578dc12eee5dc8e12",
"reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12",
"shasum": ""
},
"require": {
"ext-openssl": "*",
"ext-pcre": "*",
"php": "^5.3.2 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.5",
"psr/log": "^1.0",
"symfony/process": "^2.5 || ^3.0"
},
"suggest": {
"symfony/process": "This is necessary to reliably check whether openssl_x509_parse is vulnerable on older php versions, but can be ignored on PHP 5.5.6+"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\CaBundle\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.",
"keywords": [
"cabundle",
"cacert",
"certificate",
"ssl",
"tls"
],
"time": "2017-03-06T11:59:08+00:00"
},
{
"name": "dnoegel/php-xdg-base-dir",
"version": "0.1",
@ -3027,6 +3145,99 @@
],
"time": "2016-04-29T12:21:54+00:00"
},
{
"name": "guzzle/guzzle",
"version": "v3.8.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/4de0618a01b34aa1c8c33a3f13f396dcd3882eba",
"reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba",
"shasum": ""
},
"require": {
"ext-curl": "*",
"php": ">=5.3.3",
"symfony/event-dispatcher": ">=2.1"
},
"replace": {
"guzzle/batch": "self.version",
"guzzle/cache": "self.version",
"guzzle/common": "self.version",
"guzzle/http": "self.version",
"guzzle/inflection": "self.version",
"guzzle/iterator": "self.version",
"guzzle/log": "self.version",
"guzzle/parser": "self.version",
"guzzle/plugin": "self.version",
"guzzle/plugin-async": "self.version",
"guzzle/plugin-backoff": "self.version",
"guzzle/plugin-cache": "self.version",
"guzzle/plugin-cookie": "self.version",
"guzzle/plugin-curlauth": "self.version",
"guzzle/plugin-error-response": "self.version",
"guzzle/plugin-history": "self.version",
"guzzle/plugin-log": "self.version",
"guzzle/plugin-md5": "self.version",
"guzzle/plugin-mock": "self.version",
"guzzle/plugin-oauth": "self.version",
"guzzle/service": "self.version",
"guzzle/stream": "self.version"
},
"require-dev": {
"doctrine/cache": "*",
"monolog/monolog": "1.*",
"phpunit/phpunit": "3.7.*",
"psr/log": "1.0.*",
"symfony/class-loader": "*",
"zendframework/zend-cache": "<2.3",
"zendframework/zend-log": "<2.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.8-dev"
}
},
"autoload": {
"psr-0": {
"Guzzle": "src/",
"Guzzle\\Tests": "tests/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
},
{
"name": "Guzzle Community",
"homepage": "https://github.com/guzzle/guzzle/contributors"
}
],
"description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients",
"homepage": "http://guzzlephp.org/",
"keywords": [
"client",
"curl",
"framework",
"http",
"http client",
"rest",
"web service"
],
"abandoned": "guzzlehttp/guzzle",
"time": "2014-01-28T22:29:15+00:00"
},
{
"name": "hamcrest/hamcrest-php",
"version": "v1.2.2",
@ -3420,6 +3631,122 @@
],
"time": "2017-03-05T18:23:57+00:00"
},
{
"name": "padraic/humbug_get_contents",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/humbug/file_get_contents.git",
"reference": "279ff67be5b3bd0229326a917c3e262c644b98d6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/humbug/file_get_contents/zipball/279ff67be5b3bd0229326a917c3e262c644b98d6",
"reference": "279ff67be5b3bd0229326a917c3e262c644b98d6",
"shasum": ""
},
"require": {
"composer/ca-bundle": "^1.0",
"ext-openssl": "*",
"php": "^5.3 || ^7.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.1",
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0"
},
"type": "library",
"extra": {
"bamarni-bin": {
"bin-links": false
},
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"psr-4": {
"Humbug\\": "src/"
},
"files": [
"src/function.php",
"src/functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Pádraic Brady",
"email": "padraic.brady@gmail.com",
"homepage": "http://blog.astrumfutura.com"
}
],
"description": "Secure wrapper for accessing HTTPS resources with file_get_contents for PHP 5.3+",
"homepage": "https://github.com/padraic/file_get_contents",
"keywords": [
"download",
"file_get_contents",
"http",
"https",
"ssl",
"tls"
],
"time": "2017-06-02T10:18:25+00:00"
},
{
"name": "padraic/phar-updater",
"version": "1.0.3",
"source": {
"type": "git",
"url": "https://github.com/humbug/phar-updater.git",
"reference": "c17eeb3887dc4269d1b4837dc875d39e9f8149a8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/humbug/phar-updater/zipball/c17eeb3887dc4269d1b4837dc875d39e9f8149a8",
"reference": "c17eeb3887dc4269d1b4837dc875d39e9f8149a8",
"shasum": ""
},
"require": {
"padraic/humbug_get_contents": "^1.0",
"php": ">=5.3.3"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"Humbug\\SelfUpdate\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Padraic Brady",
"email": "padraic.brady@gmail.com",
"homepage": "http://blog.astrumfutura.com"
}
],
"description": "A thing to make PHAR self-updating easy and secure.",
"keywords": [
"humbug",
"phar",
"self-update",
"update"
],
"time": "2016-01-05T23:08:01+00:00"
},
{
"name": "phpdocumentor/reflection-common",
"version": "1.0",
@ -4092,6 +4419,64 @@
],
"time": "2017-03-19T21:40:44+00:00"
},
{
"name": "satooshi/php-coveralls",
"version": "v1.0.1",
"source": {
"type": "git",
"url": "https://github.com/satooshi/php-coveralls.git",
"reference": "da51d304fe8622bf9a6da39a8446e7afd432115c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/da51d304fe8622bf9a6da39a8446e7afd432115c",
"reference": "da51d304fe8622bf9a6da39a8446e7afd432115c",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-simplexml": "*",
"guzzle/guzzle": "^2.8|^3.0",
"php": ">=5.3.3",
"psr/log": "^1.0",
"symfony/config": "^2.1|^3.0",
"symfony/console": "^2.1|^3.0",
"symfony/stopwatch": "^2.0|^3.0",
"symfony/yaml": "^2.0|^3.0"
},
"suggest": {
"symfony/http-kernel": "Allows Symfony integration"
},
"bin": [
"bin/coveralls"
],
"type": "library",
"autoload": {
"psr-4": {
"Satooshi\\": "src/Satooshi/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Kitamura Satoshi",
"email": "with.no.parachute@gmail.com",
"homepage": "https://www.facebook.com/satooshi.jp"
}
],
"description": "PHP client library for Coveralls API",
"homepage": "https://github.com/satooshi/php-coveralls",
"keywords": [
"ci",
"coverage",
"github",
"test"
],
"time": "2016-01-20T17:35:46+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
"version": "1.0.1",
@ -4661,6 +5046,66 @@
"homepage": "https://symfony.com",
"time": "2017-02-18T17:28:00+00:00"
},
{
"name": "symfony/config",
"version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
"reference": "79f86253ba482ca7f17718e886e6d164e5ba6d45"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/config/zipball/79f86253ba482ca7f17718e886e6d164e5ba6d45",
"reference": "79f86253ba482ca7f17718e886e6d164e5ba6d45",
"shasum": ""
},
"require": {
"php": ">=5.5.9",
"symfony/filesystem": "~2.8|~3.0"
},
"conflict": {
"symfony/dependency-injection": "<3.3"
},
"require-dev": {
"symfony/dependency-injection": "~3.3",
"symfony/yaml": "~3.0"
},
"suggest": {
"symfony/yaml": "To use the yaml reference dumper"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Config\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
"time": "2017-05-29T18:41:32+00:00"
},
{
"name": "symfony/dom-crawler",
"version": "v3.2.6",
@ -4717,6 +5162,104 @@
"homepage": "https://symfony.com",
"time": "2017-02-21T09:12:04+00:00"
},
{
"name": "symfony/filesystem",
"version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "c709670bf64721202ddbe4162846f250735842c0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/c709670bf64721202ddbe4162846f250735842c0",
"reference": "c709670bf64721202ddbe4162846f250735842c0",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Filesystem\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
"time": "2017-05-28T14:08:56+00:00"
},
{
"name": "symfony/stopwatch",
"version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
"reference": "602a15299dc01556013b07167d4f5d3a60e90d15"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/602a15299dc01556013b07167d4f5d3a60e90d15",
"reference": "602a15299dc01556013b07167d4f5d3a60e90d15",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Stopwatch\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Stopwatch Component",
"homepage": "https://symfony.com",
"time": "2017-04-12T14:14:56+00:00"
},
{
"name": "symfony/yaml",
"version": "v3.2.6",