From 9f9ef962784191ff24dc9458e0da833bd92c5218 Mon Sep 17 00:00:00 2001 From: geekcom Date: Tue, 5 Mar 2019 11:22:27 -0300 Subject: [PATCH] fix: erro em phpunit.xml, melhorias nos testes, namespace para testes --- README.md | 4 +--- composer.json | 49 ++++++++++++++++++++++------------------- phpunit.xml | 8 +++---- tests/.gitkeep | 0 tests/TestValidator.php | 4 +++- 5 files changed, 33 insertions(+), 32 deletions(-) delete mode 100644 tests/.gitkeep diff --git a/README.md b/README.md index 998f3b7..e6312c4 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,6 @@ Ou rode o comando: composer require geekcom/validator-docs ``` -Agora execute o comando `composer update`. - Após a instalação, adicione no arquivo `config/app.php` no array `providers` a seguinte linha: ```php @@ -44,7 +42,7 @@ a diferença é que agora, você terá os seguintes métodos de validação: * **formato_cpf_cnpj** - Verifica se a mascara do CPF ou CNPJ é válida. ( 999.999.999-99 ) ou ( 99.999.999/9999-99 ) -Então, podemos usar um simples teste onde dizemos que o campo CPF será obrigatório e usamos a biblioteca para validar: +Então, podemos realizar um simples teste onde dizemos que o campo CPF será obrigatório e usamos a biblioteca para validar: ```php $this->validate($request, [ diff --git a/composer.json b/composer.json index 529afc4..e863c4e 100644 --- a/composer.json +++ b/composer.json @@ -1,26 +1,29 @@ { - "name": "geekcom/validator-docs", - "description": "Biblioteca para validação de Título de Eleitor, CPF, CNPJ e CNH", - "license" : "MIT", - "authors": [ - { - "name": "Daniel Rodrigues Lima", - "email": "danielrodrigues-ti@hotmail.com" - } - ], - "require": { - "illuminate/support": "5.*" - }, - "required-dev" : { - "laravel/framework": "5.*" - }, - "autoload": { - "psr-4": { - "geekcom\\ValidatorDocs\\": "src/validator-docs" - } - }, - "minimum-stability": "stable", - "require-dev": { - "laravel/laravel": "5.0.*" + "name": "geekcom/validator-docs", + "description": "Biblioteca para validação de Título de Eleitor, CPF, CNPJ e CNH", + "license": "MIT", + "authors": [ + { + "name": "Daniel Rodrigues Lima", + "email": "danielrodrigues-ti@hotmail.com" } + ], + "require": { + "illuminate/support": "5.*" + }, + "require-dev": { + "laravel/framework": "5.*", + "laravel/laravel": "5.0.*", + "phpunit/phpunit": "^7.5" + }, + "autoload": { + "psr-4": { + "geekcom\\ValidatorDocs\\": "src/validator-docs" + } + }, + "autoload-dev": { + "psr-4": { + "geekcom\\ValidatorDocs\\Tests\\": "tests" + } + } } \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml index b0c0bbf..7d88454 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,15 +1,13 @@ - + stopOnFailure="false"> ./tests/ diff --git a/tests/.gitkeep b/tests/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/tests/TestValidator.php b/tests/TestValidator.php index a5a927b..836a7ec 100644 --- a/tests/TestValidator.php +++ b/tests/TestValidator.php @@ -1,6 +1,8 @@