From 5527fb3d64b9bf8c791f524e1916cd5b76f3bb2a Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Thu, 13 Jul 2017 14:29:46 -0500 Subject: [PATCH] more fixes for travis --- .travis.yml | 4 ++-- Makefile | 6 ++---- composer.json | 3 ++- composer.lock | 45 +++++++++++++++++++++++++++++++++++++++------ phpunit.xml | 15 +++++++-------- tests/PIREPTest.php | 4 ++-- tests/TestCase.php | 2 +- 7 files changed, 55 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0eb8b5c7..cc4f1814 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ before_install: before_script: - cp .env.travis .env - composer self-update - - make build script: - - make tests + - php artisan database:create --reset + - vendor/bin/phpunit --debug --verbose --testdox tests diff --git a/Makefile b/Makefile index 866372d6..e4d2ba2a 100644 --- a/Makefile +++ b/Makefile @@ -47,10 +47,8 @@ tests: test .PHONY: test test: - @echo "" > storage/logs/laravel.log - @chmod 0777 storage/logs/* - @vendor/bin/phpunit --testdox tests - @cat storage/logs/laravel.log + #@php artisan database:create --reset > /dev/null + vendor/bin/phpunit --debug --verbose --testdox tests .PHONY: schema schema: diff --git a/composer.json b/composer.json index 9b82dc07..7c8b9f1f 100755 --- a/composer.json +++ b/composer.json @@ -32,7 +32,8 @@ "phpunit/phpunit": "~5.7", "symfony/css-selector": "3.1.*", "symfony/dom-crawler": "3.1.*", - "laravel/homestead": "^5.4" + "laravel/homestead": "^5.4", + "scriptfusion/phpunit-immediate-exception-printer": "^1" }, "autoload": { "classmap": [ diff --git a/composer.lock b/composer.lock index 32240d31..a44bfc0f 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "43f3e5ba26994dd305c74c84a42177dd", + "content-hash": "c9fe9a5a21d2f275a62bb5adda58f544", "packages": [ { "name": "anlutro/l4-settings", @@ -838,16 +838,16 @@ }, { "name": "ellipsesynergie/api-response", - "version": "0.14.0", + "version": "0.14.2", "source": { "type": "git", "url": "https://github.com/ellipsesynergie/api-response.git", - "reference": "79f7a8b63f6fc18ad7be9136d42331e2bc2840cf" + "reference": "81b565838f2790c6d857ab5134fa005d493202a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ellipsesynergie/api-response/zipball/79f7a8b63f6fc18ad7be9136d42331e2bc2840cf", - "reference": "79f7a8b63f6fc18ad7be9136d42331e2bc2840cf", + "url": "https://api.github.com/repos/ellipsesynergie/api-response/zipball/81b565838f2790c6d857ab5134fa005d493202a1", + "reference": "81b565838f2790c6d857ab5134fa005d493202a1", "shasum": "" }, "require": { @@ -895,7 +895,7 @@ "fractal", "json" ], - "time": "2017-07-05T12:23:19+00:00" + "time": "2017-07-06T13:01:20+00:00" }, { "name": "erusev/parsedown", @@ -5434,6 +5434,39 @@ ], "time": "2017-06-30T09:13:00+00:00" }, + { + "name": "scriptfusion/phpunit-immediate-exception-printer", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/ScriptFUSION/PHPUnit-Immediate-Exception-Printer.git", + "reference": "5bd117e530d87533b036ce227493ae1d92018599" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ScriptFUSION/PHPUnit-Immediate-Exception-Printer/zipball/5bd117e530d87533b036ce227493ae1d92018599", + "reference": "5bd117e530d87533b036ce227493ae1d92018599", + "shasum": "" + }, + "require": { + "phpunit/phpunit": "^5.5|^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "ScriptFUSION\\PHPUnitImmediateExceptionPrinter\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "authors": [ + { + "name": "Bilge", + "email": "bilge@scriptfusion.com" + } + ], + "description": "Immediately prints exception and assertion failures during testing.", + "time": "2017-03-11T20:54:55+00:00" + }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.1", diff --git a/phpunit.xml b/phpunit.xml index e11ecebc..87d3edc4 100755 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,13 +1,12 @@ - + stopOnFailure="false" + convertErrorsToExceptions="false" + convertNoticesToExceptions="false" + convertWarningsToExceptions="false"> ./tests diff --git a/tests/PIREPTest.php b/tests/PIREPTest.php index 2393fe15..9ca71fc1 100644 --- a/tests/PIREPTest.php +++ b/tests/PIREPTest.php @@ -56,11 +56,11 @@ class PIREPTest extends TestCase } /** - * @covers \App\Services\PilotService - * @covers \App\Services\PIREPService + * @outputBuffering disabled */ public function testAddPirep() { + print_r('hi'); $pirep = new Pirep($this->SAMPLE_PIREP); $pirep->save(); diff --git a/tests/TestCase.php b/tests/TestCase.php index d0927742..987701bb 100755 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -20,7 +20,7 @@ abstract class TestCase extends Illuminate\Foundation\Testing\TestCase } protected function reset_db() { - exec('make -f '.__DIR__.'/../Makefile unittest-db'); +// exec('make -f '.__DIR__.'/../Makefile unittest-db'); } public function setUp() {