Add ci and coverage test

This commit is contained in:
LI JIAHAO
2017-03-20 14:10:37 +08:00
parent ab3f6f20bc
commit d35e1eebb6
10 changed files with 562 additions and 115 deletions
+10
View File
@@ -0,0 +1,10 @@
APP_ENV=testing
APP_KEY=SomeRandomString
DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
+1
View File
@@ -1,6 +1,7 @@
/vendor
/node_modules
/public/storage
/build
Homestead.yaml
Homestead.json
.env
+37
View File
@@ -0,0 +1,37 @@
language: php
php:
- 5.6
- 5.5
- 5.4
- 7.0
- 7.1
- hhvm
- nightly
matrix:
allow_failures:
- php: 5.5
- php: 5.4
- php: hhvm
- php: nightly
before_script:
- mkdir -p bootstrap/cache
- cp .env.travis .env
- mysql -e 'create database homestead;'
- composer self-update
- composer install --no-interaction
- php artisan key:generate
- php artisan migrate
- php artisan db:seed
script:
- mkdir -p build/logs
- vendor/bin/phpunit -c phpunit.xml.dist
after_success:
- travis_retry php vendor/bin/coveralls
notifications:
webhooks: https://fathomless-fjord-24024.herokuapp.com/notify
+7 -3
View File
@@ -7,7 +7,9 @@
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.4.*",
"intervention/image": "^2.3"
"intervention/image": "^2.3",
"laravel/browser-kit-testing": "^1.0",
"satooshi/php-coveralls": "^1.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
@@ -21,12 +23,14 @@
"database"
],
"psr-4": {
"App\\": "app/"
"App\\": "app/",
"Tests\\": "tests/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
"tests/TestCase.php",
"tests/BrowserKitTestCase.php"
]
},
"scripts": {
Generated
+446 -96
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": "62da527cbaba0f24a9b8d9d60fb87b06",
"content-hash": "1f05ce6b3f8c84c25aee90302b66f506",
"packages": [
{
"name": "doctrine/inflector",
@@ -115,6 +115,99 @@
],
"time": "2016-11-02T15:56:58+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://files.phpcomposer.com/files/guzzle/guzzle/4de0618a01b34aa1c8c33a3f13f396dcd3882eba.zip",
"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": "guzzlehttp/psr7",
"version": "1.4.1",
@@ -242,6 +335,51 @@
],
"time": "2017-02-04T10:37:19+00:00"
},
{
"name": "laravel/browser-kit-testing",
"version": "v1.0.1",
"source": {
"type": "git",
"url": "https://github.com/laravel/browser-kit-testing.git",
"reference": "442a9de17b5acc1a140c322f67ea4ee0f1c42688"
},
"dist": {
"type": "zip",
"url": "https://files.phpcomposer.com/files/laravel/browser-kit-testing/442a9de17b5acc1a140c322f67ea4ee0f1c42688.zip",
"reference": "442a9de17b5acc1a140c322f67ea4ee0f1c42688",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
"Laravel\\BrowserKitTesting\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Taylor Otwell",
"email": "taylor@laravel.com"
}
],
"description": "Provides backwards compatibility for BrowserKit testing in Laravel 5.4.",
"keywords": [
"laravel",
"testing"
],
"time": "2017-01-24T13:11:16+00:00"
},
{
"name": "laravel/framework",
"version": "v5.4.15",
@@ -373,16 +511,16 @@
},
{
"name": "league/flysystem",
"version": "1.0.35",
"version": "1.0.36",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem.git",
"reference": "dda7f3ab94158a002d9846a97dc18ebfb7acc062"
"reference": "d9c1698582dfbfbd092ec9c5c3325f862cdb3297"
},
"dist": {
"type": "zip",
"url": "https://files.phpcomposer.com/files/thephpleague/flysystem/dda7f3ab94158a002d9846a97dc18ebfb7acc062.zip",
"reference": "dda7f3ab94158a002d9846a97dc18ebfb7acc062",
"url": "https://files.phpcomposer.com/files/thephpleague/flysystem/d9c1698582dfbfbd092ec9c5c3325f862cdb3297.zip",
"reference": "d9c1698582dfbfbd092ec9c5c3325f862cdb3297",
"shasum": ""
},
"require": {
@@ -452,20 +590,20 @@
"sftp",
"storage"
],
"time": "2017-02-09T11:33:58+00:00"
"time": "2017-03-18T16:02:30+00:00"
},
{
"name": "monolog/monolog",
"version": "1.22.0",
"version": "1.22.1",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "bad29cb8d18ab0315e6c477751418a82c850d558"
"reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0"
},
"dist": {
"type": "zip",
"url": "https://packagist.phpcomposer.com/files/Seldaek/monolog/bad29cb8d18ab0315e6c477751418a82c850d558.zip",
"reference": "bad29cb8d18ab0315e6c477751418a82c850d558",
"url": "https://files.phpcomposer.com/files/Seldaek/monolog/1e044bc4b34e91743943479f1be7a1d5eb93add0.zip",
"reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0",
"shasum": ""
},
"require": {
@@ -530,7 +668,7 @@
"logging",
"psr-3"
],
"time": "2016-11-26T00:15:39+00:00"
"time": "2017-03-13T07:08:03+00:00"
},
{
"name": "mtdowling/cron-expression",
@@ -631,16 +769,16 @@
},
{
"name": "paragonie/random_compat",
"version": "v2.0.9",
"version": "v2.0.10",
"source": {
"type": "git",
"url": "https://github.com/paragonie/random_compat.git",
"reference": "6968531206671f94377b01dc7888d5d1b858a01b"
"reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d"
},
"dist": {
"type": "zip",
"url": "https://files.phpcomposer.com/files/paragonie/random_compat/6968531206671f94377b01dc7888d5d1b858a01b.zip",
"reference": "6968531206671f94377b01dc7888d5d1b858a01b",
"url": "https://files.phpcomposer.com/files/paragonie/random_compat/634bae8e911eefa89c1abfbf1b66da679ac8f54d.zip",
"reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d",
"shasum": ""
},
"require": {
@@ -675,7 +813,7 @@
"pseudorandom",
"random"
],
"time": "2017-03-03T20:43:42+00:00"
"time": "2017-03-13T16:27:32+00:00"
},
{
"name": "psr/http-message",
@@ -776,21 +914,21 @@
},
{
"name": "ramsey/uuid",
"version": "3.5.2",
"version": "3.6.0",
"source": {
"type": "git",
"url": "https://github.com/ramsey/uuid.git",
"reference": "5677cfe02397dd6b58c861870dfaa5d9007d3954"
"reference": "0b7bdfb180e72c8d76e75a649ced67e392201458"
},
"dist": {
"type": "zip",
"url": "https://files.phpcomposer.com/files/ramsey/uuid/5677cfe02397dd6b58c861870dfaa5d9007d3954.zip",
"reference": "5677cfe02397dd6b58c861870dfaa5d9007d3954",
"url": "https://files.phpcomposer.com/files/ramsey/uuid/0b7bdfb180e72c8d76e75a649ced67e392201458.zip",
"reference": "0b7bdfb180e72c8d76e75a649ced67e392201458",
"shasum": ""
},
"require": {
"paragonie/random_compat": "^1.0|^2.0",
"php": ">=5.4"
"php": "^5.4 || ^7.0"
},
"replace": {
"rhumsaa/uuid": "self.version"
@@ -854,7 +992,65 @@
"identifier",
"uuid"
],
"time": "2016-11-22T19:21:44+00:00"
"time": "2017-03-18T15:38:09+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://files.phpcomposer.com/files/satooshi/php-coveralls/da51d304fe8622bf9a6da39a8446e7afd432115c.zip",
"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": "swiftmailer/swiftmailer",
@@ -910,9 +1106,65 @@
],
"time": "2017-02-13T07:52:53+00:00"
},
{
"name": "symfony/config",
"version": "v3.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
"reference": "741d6d4cd1414d67d48eb71aba6072b46ba740c2"
},
"dist": {
"type": "zip",
"url": "https://files.phpcomposer.com/files/symfony/config/741d6d4cd1414d67d48eb71aba6072b46ba740c2.zip",
"reference": "741d6d4cd1414d67d48eb71aba6072b46ba740c2",
"shasum": ""
},
"require": {
"php": ">=5.5.9",
"symfony/filesystem": "~2.8|~3.0"
},
"require-dev": {
"symfony/yaml": "~3.0"
},
"suggest": {
"symfony/yaml": "To use the yaml reference dumper"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-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-03-01T18:18:25+00:00"
},
{
"name": "symfony/console",
"version": "v3.2.5",
"version": "v3.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
@@ -1028,7 +1280,7 @@
},
{
"name": "symfony/debug",
"version": "v3.2.5",
"version": "v3.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
@@ -1085,7 +1337,7 @@
},
{
"name": "symfony/event-dispatcher",
"version": "v3.2.5",
"version": "v3.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
@@ -1143,9 +1395,58 @@
"homepage": "https://symfony.com",
"time": "2017-02-21T09:12:04+00:00"
},
{
"name": "symfony/filesystem",
"version": "v3.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "bc0f17bed914df2cceb989972c3b996043c4da4a"
},
"dist": {
"type": "zip",
"url": "https://files.phpcomposer.com/files/symfony/filesystem/bc0f17bed914df2cceb989972c3b996043c4da4a.zip",
"reference": "bc0f17bed914df2cceb989972c3b996043c4da4a",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-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-03-06T19:30:27+00:00"
},
{
"name": "symfony/finder",
"version": "v3.2.5",
"version": "v3.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
@@ -1194,7 +1495,7 @@
},
{
"name": "symfony/http-foundation",
"version": "v3.2.5",
"version": "v3.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
@@ -1247,16 +1548,16 @@
},
{
"name": "symfony/http-kernel",
"version": "v3.2.5",
"version": "v3.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "bf1506fd6beb944d8afd052cd2e9ee8ceaf1c253"
"reference": "bc909e85b8585c9edf043d0fca871308c41bb9b4"
},
"dist": {
"type": "zip",
"url": "https://files.phpcomposer.com/files/symfony/http-kernel/bf1506fd6beb944d8afd052cd2e9ee8ceaf1c253.zip",
"reference": "bf1506fd6beb944d8afd052cd2e9ee8ceaf1c253",
"url": "https://files.phpcomposer.com/files/symfony/http-kernel/bc909e85b8585c9edf043d0fca871308c41bb9b4.zip",
"reference": "bc909e85b8585c9edf043d0fca871308c41bb9b4",
"shasum": ""
},
"require": {
@@ -1325,7 +1626,7 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com",
"time": "2017-03-09T02:01:51+00:00"
"time": "2017-03-10T18:35:31+00:00"
},
{
"name": "symfony/polyfill-mbstring",
@@ -1388,7 +1689,7 @@
},
{
"name": "symfony/process",
"version": "v3.2.5",
"version": "v3.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
@@ -1437,7 +1738,7 @@
},
{
"name": "symfony/routing",
"version": "v3.2.5",
"version": "v3.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
@@ -1510,9 +1811,58 @@
],
"time": "2017-03-02T15:58:09+00:00"
},
{
"name": "symfony/stopwatch",
"version": "v3.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
"reference": "c5ee0f8650c84b4d36a5f76b3b504233feaabf75"
},
"dist": {
"type": "zip",
"url": "https://files.phpcomposer.com/files/symfony/stopwatch/c5ee0f8650c84b4d36a5f76b3b504233feaabf75.zip",
"reference": "c5ee0f8650c84b4d36a5f76b3b504233feaabf75",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-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-02-18T17:28:00+00:00"
},
{
"name": "symfony/translation",
"version": "v3.2.5",
"version": "v3.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
@@ -1576,7 +1926,7 @@
},
{
"name": "symfony/var-dumper",
"version": "v3.2.5",
"version": "v3.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
@@ -1640,6 +1990,61 @@
],
"time": "2017-02-20T13:45:48+00:00"
},
{
"name": "symfony/yaml",
"version": "v3.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "093e416ad096355149e265ea2e4cc1f9ee40ab1a"
},
"dist": {
"type": "zip",
"url": "https://files.phpcomposer.com/files/symfony/yaml/093e416ad096355149e265ea2e4cc1f9ee40ab1a.zip",
"reference": "093e416ad096355149e265ea2e4cc1f9ee40ab1a",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
},
"require-dev": {
"symfony/console": "~2.8|~3.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Yaml\\": ""
},
"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 Yaml Component",
"homepage": "https://symfony.com",
"time": "2017-03-07T16:47:02+00:00"
},
{
"name": "tijsverkoyen/css-to-inline-styles",
"version": "2.2.0",
@@ -2453,16 +2858,16 @@
},
{
"name": "phpunit/phpunit",
"version": "5.7.15",
"version": "5.7.17",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "b99112aecc01f62acf3d81a3f59646700a1849e5"
"reference": "68752b665d3875f9a38a357e3ecb35c79f8673bf"
},
"dist": {
"type": "zip",
"url": "https://files.phpcomposer.com/files/sebastianbergmann/phpunit/b99112aecc01f62acf3d81a3f59646700a1849e5.zip",
"reference": "b99112aecc01f62acf3d81a3f59646700a1849e5",
"url": "https://files.phpcomposer.com/files/sebastianbergmann/phpunit/68752b665d3875f9a38a357e3ecb35c79f8673bf.zip",
"reference": "68752b665d3875f9a38a357e3ecb35c79f8673bf",
"shasum": ""
},
"require": {
@@ -2531,7 +2936,7 @@
"testing",
"xunit"
],
"time": "2017-03-02T15:22:43+00:00"
"time": "2017-03-19T16:52:12+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
@@ -3161,61 +3566,6 @@
"homepage": "https://symfony.com",
"time": "2016-07-30T07:22:48+00:00"
},
{
"name": "symfony/yaml",
"version": "v3.2.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "093e416ad096355149e265ea2e4cc1f9ee40ab1a"
},
"dist": {
"type": "zip",
"url": "https://files.phpcomposer.com/files/symfony/yaml/093e416ad096355149e265ea2e4cc1f9ee40ab1a.zip",
"reference": "093e416ad096355149e265ea2e4cc1f9ee40ab1a",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
},
"require-dev": {
"symfony/console": "~2.8|~3.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Yaml\\": ""
},
"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 Yaml Component",
"homepage": "https://symfony.com",
"time": "2017-03-07T16:47:02+00:00"
},
{
"name": "webmozart/assert",
"version": "1.2.0",
+12
View File
@@ -78,6 +78,18 @@ return [
'schema' => 'public',
],
'testing' => [
'driver' => 'mysql',
'host' => env('DB_TEST_HOST', 'localhost'),
'database' => env('DB_TEST_DATABASE', 'homestead'),
'username' => env('DB_TEST_USERNAME', 'homestead'),
'password' => env('DB_TEST_PASSWORD', 'secret'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
],
],
/*
+11
View File
@@ -16,12 +16,23 @@
<filter>
<whitelist>
<directory suffix=".php">app/</directory>
<exclude>
<directory>./build</directory>
<directory>./composer</directory>
<directory>./tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
<php>
<env name="APP_ENV" value="testing"/>
<env name="DB_CONNECTION" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
</php>
<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<log type="junit" target="build/logs/junit.xml" logIncompleteSkipped="false"/>
</logging>
</phpunit>
+5 -14
View File
@@ -1,19 +1,10 @@
### Todolist (Progress)
# NEUP Flea Market
* Appearances
* [x] Header
* [ ] Homepage
[![Build Status](https://travis-ci.org/NEUP-Net-Depart/NEUP-FleaMarket.svg?branch=master)](https://travis-ci.org/NEUP-Net-Depart/NEUP-FleaMarket)
[![Coverage Status](https://coveralls.io/repos/github/NEUP-Net-Depart/NEUP-FleaMarket/badge.svg?branch=master)](https://coveralls.io/github/NEUP-Net-Depart/NEUP-FleaMarket?branch=master)
* Functions of good
* [ ] GoodList (Frontend)
* [ ] Manage goods (Frontend)
* [ ] FavList (Frontend)
* [ ] Transaction
## Todolist (Progress)
* Functions of user
* [ ] Basic user function (Frontend)
* [ ] Mail
* Functions of admin
[Check it here!](https://github.com/NEUP-Net-Depart/NEUP-FleaMarket/wiki)
**Made By NEUP-Net-Depart**
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace Tests;
use Illuminate\Contracts\Console\Kernel;
use Laravel\BrowserKitTesting\TestCase as BaseTestCase;
abstract class BrowserKitTestCase extends BaseTestCase
{
/**
* The base URL of the application.
*
* @var string
*/
public $baseUrl = 'http://localhost';
/**
* Creates the application.
*
* @return \Illuminate\Foundation\Application
*/
public function createApplication()
{
$app = require __DIR__.'/../bootstrap/app.php';
$app->make(Kernel::class)->bootstrap();
return $app;
}
}
+3 -2
View File
@@ -3,8 +3,9 @@
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Tests\BrowserKitTestCase;
class ExampleTest extends TestCase
class ExampleTest extends BrowserKitTestCase
{
/**
* A basic functional test example.
@@ -14,6 +15,6 @@ class ExampleTest extends TestCase
public function testBasicExample()
{
$this->visit('/')
->see('Laravel 5');
->see('市场');
}
}