Skip to content

Commit

Permalink
Add testbench and travis
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoKouzelis committed Sep 25, 2019
1 parent aa2113a commit 50fc489
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/vendor/
composer.lock
.php_cs.cache
.phpunit.result.cache
*.swp
tags
56 changes: 56 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
cache:
directories:
- $HOME/.composer/cache

language: php

env:
global:
- COVERAGE=0

matrix:
include:
- php: 7.0
env: LARAVEL='5.5.*' TESTBENCH='3.5.*'
- php: 7.1
env: LARAVEL='5.5.*' TESTBENCH='3.5.*'
- php: 7.1
env: LARAVEL='5.6.*' TESTBENCH='3.6.*'
- php: 7.1
env: LARAVEL='5.7.*' TESTBENCH='3.7.*'
- php: 7.1
env: LARAVEL='5.8.*' TESTBENCH='3.8.*'
- php: 7.2
env: LARAVEL='5.5.*' TESTBENCH='3.5.*'
- php: 7.2
env: LARAVEL='5.6.*' TESTBENCH='3.6.*'
- php: 7.2
env: LARAVEL='5.7.*' TESTBENCH='3.7.*'
- php: 7.2
env: LARAVEL='5.8.*' TESTBENCH='3.8.*'
- php: 7.2
env: LARAVEL='6.*' TESTBENCH='4.*'
- php: 7.3
env: LARAVEL='5.5.*' TESTBENCH='3.5.*'
- php: 7.3
env: LARAVEL='5.6.*' TESTBENCH='3.6.*'
- php: 7.3
env: LARAVEL='5.7.*' TESTBENCH='3.7.*'
- php: 7.3
env: LARAVEL='5.8.*' TESTBENCH='3.8.*'
- php: 7.3
env: LARAVEL='6.*' TESTBENCH='4.*'
fast_finish: true

before_script:
- composer config discard-changes true

before_install:
- travis_retry composer self-update
- travis_retry composer require "laravel/framework:${LARAVEL}" "orchestra/testbench:${TESTBENCH}" --no-interaction --no-update

install:
- travis_retry composer install --prefer-dist --no-interaction --no-suggest

script:
- vendor/bin/phpunit
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"guzzlehttp/guzzle": "^6.0"
},
"require-dev": {
"phpunit/phpunit": "^7.0",
"psr/log": "^1.0"
"psr/log": "^1.0",
"orchestra/testbench": "^4.0"
},
"autoload": {
"psr-4": {
Expand Down
7 changes: 6 additions & 1 deletion tests/EmailRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use GuzzleHttp\Handler\MockHandler;
use GuzzleHttp\Psr7\Response;
use Kouz\LaravelMailgunValidation\EmailRule;
use PHPUnit\Framework\TestCase;
use Orchestra\Testbench\TestCase;
use Psr\Log\LoggerInterface;

class EmailRuleTest extends TestCase
Expand All @@ -25,6 +25,11 @@ class EmailRuleTest extends TestCase
'reason' => null,
];

protected function getPackageProviders($app)
{
return ['Kouz\LaravelMailgunValidation\ServiceProvider'];
}

/**
* @test
*/
Expand Down

0 comments on commit 50fc489

Please sign in to comment.