diff --git a/.travis.yml b/.travis.yml index 5e3db6b7..be0b4b7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,10 +6,40 @@ php: - 5.6 - 7.0 - 7.1 + - 7.2 + - 7.3 env: matrix: - - LARAVEL=5.4 + - LARAVEL=5.4 + - LARAVEL=5.5 + - LARAVEL=5.6 + - LARAVEL=5.7 + - LARAVEL=5.8 + - LARAVEL=6.0 + +matrix: + exclude: + - php: 5.6 + env: LARAVEL=5.5 + - php: 5.6 + env: LARAVEL=5.6 + - php: 5.6 + env: LARAVEL=5.7 + - php: 5.6 + env: LARAVEL=5.8 + - php: 5.6 + env: LARAVEL=6.0 + - php: 7.0 + env: LARAVEL=5.6 + - php: 7.0 + env: LARAVEL=5.7 + - php: 7.0 + env: LARAVEL=5.8 + - php: 7.0 + env: LARAVEL=6.0 + - php: 7.1 + env: LARAVEL=6.0 before_script: - export COMPOSER=tests/composer-$LARAVEL.json diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5e0d9663..c5e9360f 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,5 +1,5 @@ - - - diff --git a/tests/Facades/JsVaidatorFacadeTest.php b/tests/Facades/JsVaidatorFacadeTest.php index a11940bb..039f202d 100644 --- a/tests/Facades/JsVaidatorFacadeTest.php +++ b/tests/Facades/JsVaidatorFacadeTest.php @@ -3,15 +3,15 @@ namespace Proengsoft\JsValidation\Test\Facades; use Mockery as m; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; use Proengsoft\JsValidation\Facades\JsValidatorFacade; -class JsValidatorFacadeTest extends PHPUnit_Framework_TestCase { +class JsValidatorFacadeTest extends TestCase { /** * Calls Mockery::close */ - public function tearDown() + protected function tearDown() { m::close(); } diff --git a/tests/Javascript/JavascriptRulesTraitTest.php b/tests/Javascript/JavascriptRulesTraitTest.php index 2de52a14..1662cf15 100644 --- a/tests/Javascript/JavascriptRulesTraitTest.php +++ b/tests/Javascript/JavascriptRulesTraitTest.php @@ -2,9 +2,9 @@ namespace Proengsoft\JsValidation\Tests\Javascript; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; -class JavascriptRulesTraitTest extends PHPUnit_Framework_TestCase +class JavascriptRulesTraitTest extends TestCase { protected $mockTrait; diff --git a/tests/Javascript/JavascriptValidatorTest.php b/tests/Javascript/JavascriptValidatorTest.php index 723e8cdc..628fe2cc 100644 --- a/tests/Javascript/JavascriptValidatorTest.php +++ b/tests/Javascript/JavascriptValidatorTest.php @@ -4,12 +4,12 @@ use Illuminate\Support\Facades\View; use Mockery as m; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; use Proengsoft\JsValidation\Exceptions\PropertyNotFoundException; use Proengsoft\JsValidation\Javascript\JavascriptValidator; use Proengsoft\JsValidation\Javascript\ValidatorHandler; -class JavascriptValidatorTest extends PHPUnit_Framework_TestCase +class JavascriptValidatorTest extends TestCase { public function setUp() { diff --git a/tests/Javascript/MessageParserTest.php b/tests/Javascript/MessageParserTest.php index fcbf932c..30493a28 100644 --- a/tests/Javascript/MessageParserTest.php +++ b/tests/Javascript/MessageParserTest.php @@ -2,10 +2,10 @@ namespace Proengsoft\JsValidation\Tests\Javascript; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; use Proengsoft\JsValidation\Javascript\MessageParser; -class MessageParserTest extends PHPUnit_Framework_TestCase +class MessageParserTest extends TestCase { public function testGetMessage() { diff --git a/tests/Javascript/RuleParserTest.php b/tests/Javascript/RuleParserTest.php index b0534307..f65e4f93 100644 --- a/tests/Javascript/RuleParserTest.php +++ b/tests/Javascript/RuleParserTest.php @@ -2,10 +2,10 @@ namespace Proengsoft\JsValidation\Tests\Javascript; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; use Proengsoft\JsValidation\Javascript\RuleParser; -class RuleParserTest extends PHPUnit_Framework_TestCase +class RuleParserTest extends TestCase { public function testGetClientRule() { diff --git a/tests/Javascript/ValidatorHandlerTest.php b/tests/Javascript/ValidatorHandlerTest.php index 5421f0e6..583ce523 100644 --- a/tests/Javascript/ValidatorHandlerTest.php +++ b/tests/Javascript/ValidatorHandlerTest.php @@ -2,11 +2,11 @@ namespace Proengsoft\JsValidation\Tests\Javascript; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; use Proengsoft\JsValidation\Javascript\RuleParser; use Proengsoft\JsValidation\Javascript\ValidatorHandler; -class ValidatorHandlerTest extends PHPUnit_Framework_TestCase +class ValidatorHandlerTest extends TestCase { public function testValidationData() { diff --git a/tests/JsValidationServiceProviderTest.php b/tests/JsValidationServiceProviderTest.php index f6b0a2c4..ace402a6 100644 --- a/tests/JsValidationServiceProviderTest.php +++ b/tests/JsValidationServiceProviderTest.php @@ -2,9 +2,9 @@ namespace Proengsoft\JsValidation\Tests; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; -class JsValidationServiceProviderTest extends PHPUnit_Framework_TestCase +class JsValidationServiceProviderTest extends TestCase { protected function getMockedService($app) { diff --git a/tests/JsValidatorFactoryTest.php b/tests/JsValidatorFactoryTest.php index 16b4c0fa..48021566 100644 --- a/tests/JsValidatorFactoryTest.php +++ b/tests/JsValidatorFactoryTest.php @@ -3,12 +3,12 @@ namespace Proengsoft\JsValidation\Tests; use Mockery as m; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; use Proengsoft\JsValidation\JsValidatorFactory; require_once __DIR__.'/stubs/JsValidatorFactoryTest.php'; -class JsValidatorFactoryTest extends PHPUnit_Framework_TestCase +class JsValidatorFactoryTest extends TestCase { protected function mockedApp($rules, $messages, $customAttributes, $data = []) { diff --git a/tests/Remote/ResolverTest.php b/tests/Remote/ResolverTest.php index 47c43e52..c2c40664 100644 --- a/tests/Remote/ResolverTest.php +++ b/tests/Remote/ResolverTest.php @@ -3,12 +3,12 @@ namespace Proengsoft\JsValidation\Tests\Remote; use Illuminate\Http\Exceptions\HttpResponseException; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; use Proengsoft\JsValidation\Remote\Resolver; require_once __DIR__.'/../stubs/ResolverTest.php'; -class ResolverTest extends PHPUnit_Framework_TestCase +class ResolverTest extends TestCase { public function setUp() { diff --git a/tests/Remote/ValidatorTest.php b/tests/Remote/ValidatorTest.php index ab487532..46f0c46e 100644 --- a/tests/Remote/ValidatorTest.php +++ b/tests/Remote/ValidatorTest.php @@ -7,14 +7,14 @@ use Illuminate\Translation\Translator; use Illuminate\Validation\ValidationException; use Illuminate\Validation\Validator as LaravelValidator; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; use Proengsoft\JsValidation\Javascript\ValidatorHandler; use Proengsoft\JsValidation\Remote\Validator; use Symfony\Component\Translation\Loader\ArrayLoader as SymfonyArrayLoader; use Symfony\Component\Translation\MessageSelector; use Symfony\Component\Translation\Translator as SymfonyTranslator; -class ValidatorTest extends PHPUnit_Framework_TestCase +class ValidatorTest extends TestCase { public function testValidateRemoteRulePasses() { diff --git a/tests/RemoteValidationMiddlewareTest.php b/tests/RemoteValidationMiddlewareTest.php index d12c2441..063b1c53 100644 --- a/tests/RemoteValidationMiddlewareTest.php +++ b/tests/RemoteValidationMiddlewareTest.php @@ -2,11 +2,11 @@ namespace Proengsoft\JsValidation\Tests; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; use Proengsoft\JsValidation\Remote\Validator; use Proengsoft\JsValidation\RemoteValidationMiddleware; -class RemoteValidationMiddlewareTest extends PHPUnit_Framework_TestCase +class RemoteValidationMiddlewareTest extends TestCase { public function setUp() { diff --git a/tests/Support/AccessProtectedTraitTest.php b/tests/Support/AccessProtectedTraitTest.php index 2964828b..70f40c52 100644 --- a/tests/Support/AccessProtectedTraitTest.php +++ b/tests/Support/AccessProtectedTraitTest.php @@ -2,7 +2,7 @@ namespace Proengsoft\JsValidation\Support; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; class ProtectedClassStubTest { @@ -14,7 +14,7 @@ protected function protectedMethod() } } -class AccessProtectedTraitTest extends PHPUnit_Framework_TestCase +class AccessProtectedTraitTest extends TestCase { private $mockTrait; private $stubInstance; diff --git a/tests/Support/DelegatedValidatorTest.php b/tests/Support/DelegatedValidatorTest.php index dab6376d..4611366f 100644 --- a/tests/Support/DelegatedValidatorTest.php +++ b/tests/Support/DelegatedValidatorTest.php @@ -2,9 +2,9 @@ namespace Proengsoft\JsValidation\Support; //use Proengsoft\JsValidation\Support\DelegatedValidator; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; -class DelegatedValidatorTest extends PHPUnit_Framework_TestCase +class DelegatedValidatorTest extends TestCase { /** * Test getValidator method diff --git a/tests/Support/RuleListTraitTest.php b/tests/Support/RuleListTraitTest.php index b3038c07..0a3dc319 100644 --- a/tests/Support/RuleListTraitTest.php +++ b/tests/Support/RuleListTraitTest.php @@ -2,9 +2,9 @@ namespace Proengsoft\JsValidation\Support; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; -class RuleListTraitTest extends PHPUnit_Framework_TestCase +class RuleListTraitTest extends TestCase { private $mockTrait; diff --git a/tests/Support/UseDelegatedValidatorTraitTest.php b/tests/Support/UseDelegatedValidatorTraitTest.php index acf8f3a4..438757a9 100644 --- a/tests/Support/UseDelegatedValidatorTraitTest.php +++ b/tests/Support/UseDelegatedValidatorTraitTest.php @@ -2,9 +2,9 @@ namespace Proengsoft\JsValidation\Support; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; -class UseDelegatedValidatorTraitTest extends PHPUnit_Framework_TestCase +class UseDelegatedValidatorTraitTest extends TestCase { public function testGetterAndSetter() { diff --git a/tests/autoload.php b/tests/autoload.php new file mode 100644 index 00000000..d1b48610 --- /dev/null +++ b/tests/autoload.php @@ -0,0 +1,47 @@ +=7.0.8", + "illuminate/support": "5.5.*", + "illuminate/validation": "5.5.*", + "illuminate/contracts": "5.5.*", + "illuminate/view": "5.5.*", + "illuminate/config": "5.5.*", + "illuminate/http": "5.5.*", + "illuminate/translation": "5.5.*" + }, + "require-dev": { + "phpunit/phpunit": "~6.0", + "mockery/mockery": "^0.9.8" + }, + "autoload": { + "psr-4": { + "Proengsoft\\JsValidation\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Proengsoft\\JsValidation\\Tests\\": "tests" + } + } +} diff --git a/tests/composer-5.6.json b/tests/composer-5.6.json new file mode 100644 index 00000000..2875cacf --- /dev/null +++ b/tests/composer-5.6.json @@ -0,0 +1,26 @@ +{ + "require": { + "php": ">=7.1.3", + "illuminate/support": "5.6.*", + "illuminate/validation": "5.6.*", + "illuminate/contracts": "5.6.*", + "illuminate/view": "5.6.*", + "illuminate/config": "5.6.*", + "illuminate/http": "5.6.*", + "illuminate/translation": "5.6.*" + }, + "require-dev": { + "phpunit/phpunit": "^7.0", + "mockery/mockery": "^1.0" + }, + "autoload": { + "psr-4": { + "Proengsoft\\JsValidation\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Proengsoft\\JsValidation\\Tests\\": "tests" + } + } +} diff --git a/tests/composer-5.7.json b/tests/composer-5.7.json new file mode 100644 index 00000000..f62642b0 --- /dev/null +++ b/tests/composer-5.7.json @@ -0,0 +1,26 @@ +{ + "require": { + "php": ">=7.1.3", + "illuminate/support": "5.7.*", + "illuminate/validation": "5.7.*", + "illuminate/contracts": "5.7.*", + "illuminate/view": "5.7.*", + "illuminate/config": "5.7.*", + "illuminate/http": "5.7.*", + "illuminate/translation": "5.7.*" + }, + "require-dev": { + "phpunit/phpunit": "^7.0", + "mockery/mockery": "^1.0" + }, + "autoload": { + "psr-4": { + "Proengsoft\\JsValidation\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Proengsoft\\JsValidation\\Tests\\": "tests" + } + } +} diff --git a/tests/composer-5.8.json b/tests/composer-5.8.json new file mode 100644 index 00000000..1f4f66c9 --- /dev/null +++ b/tests/composer-5.8.json @@ -0,0 +1,26 @@ +{ + "require": { + "php": ">=7.1.3", + "illuminate/support": "5.8.*", + "illuminate/validation": "5.8.*", + "illuminate/contracts": "5.8.*", + "illuminate/view": "5.8.*", + "illuminate/config": "5.8.*", + "illuminate/http": "5.8.*", + "illuminate/translation": "5.8.*" + }, + "require-dev": { + "phpunit/phpunit": "^7.0", + "mockery/mockery": "^1.0" + }, + "autoload": { + "psr-4": { + "Proengsoft\\JsValidation\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Proengsoft\\JsValidation\\Tests\\": "tests" + } + } +} diff --git a/tests/composer-6.0.json b/tests/composer-6.0.json new file mode 100644 index 00000000..af120daa --- /dev/null +++ b/tests/composer-6.0.json @@ -0,0 +1,26 @@ +{ + "require": { + "php": ">=7.2.0", + "illuminate/support": "^6.0", + "illuminate/validation": "^6.0", + "illuminate/contracts": "^6.0", + "illuminate/view": "^6.0", + "illuminate/config": "^6.0", + "illuminate/http": "^6.0", + "illuminate/translation": "^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0", + "mockery/mockery": "^1.0" + }, + "autoload": { + "psr-4": { + "Proengsoft\\JsValidation\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Proengsoft\\JsValidation\\Tests\\": "tests" + } + } +}