Compare commits
No commits in common. "master" and "2" have entirely different histories.
25
Jenkinsfile
vendored
25
Jenkinsfile
vendored
|
@ -1,25 +0,0 @@
|
||||||
pipeline {
|
|
||||||
agent any
|
|
||||||
|
|
||||||
stages {
|
|
||||||
stage('PHP 7.1') {
|
|
||||||
steps {
|
|
||||||
sh '/usr/local/bin/composer-php7.1 install'
|
|
||||||
sh 'php7.1 /usr/local/bin/phpunit-7'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('PHP 7.3') {
|
|
||||||
steps {
|
|
||||||
sh '/usr/local/bin/composer-php7.3 update'
|
|
||||||
sh 'php7.3 /usr/local/bin/phpunit-9'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('PHP 7.4') {
|
|
||||||
steps {
|
|
||||||
sh '/usr/local/bin/composer-php7.4 update'
|
|
||||||
sh 'php7.4 /usr/local/bin/phpunit-9'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
csv-validator
|
csv-validator
|
||||||
=============
|
=============
|
||||||
|
|
||||||
[![Build Status](https://ci.gitnet.fr/buildStatus/icon?job=Gitnet%2Fcsv-validator%2F3)](https://ci.gitnet.fr/job/Gitnet/job/csv-validator/job/3/)
|
[![](https://phpci.gitnet.fr/build-status/image/1?branch=master&label=PHPCensor&style=flat-square)](https://phpci.gitnet.fr/build-status/view/1)
|
||||||
|
|
||||||
CSV validator library
|
CSV validator library
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
},
|
},
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.1.3",
|
"php": ">=5.6.0",
|
||||||
"symfony/validator": "^4",
|
"symfony/validator": "3.*",
|
||||||
"deblan/csv": "v2.0.*|v3.*"
|
"deblan/csv": "v2.0.*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
convertWarningsToExceptions = "true"
|
convertWarningsToExceptions = "true"
|
||||||
processIsolation = "false"
|
processIsolation = "false"
|
||||||
stopOnFailure = "false"
|
stopOnFailure = "false"
|
||||||
|
syntaxCheck = "true"
|
||||||
bootstrap = "vendor/autoload.php" >
|
bootstrap = "vendor/autoload.php" >
|
||||||
|
|
||||||
<testsuites>
|
<testsuites>
|
||||||
|
|
|
@ -122,7 +122,6 @@ class Validator
|
||||||
if ($this->parser !== $parser) {
|
if ($this->parser !== $parser) {
|
||||||
$this->parser = $parser;
|
$this->parser = $parser;
|
||||||
$this->errors = [];
|
$this->errors = [];
|
||||||
$this->hasValidate = false;
|
|
||||||
} elseif ($this->hasValidate) {
|
} elseif ($this->hasValidate) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* class ExampleTest.
|
* class ExampleTest.
|
||||||
*
|
*
|
||||||
* @author Simon Vieille <simon@deblan.fr>
|
* @author Simon Vieille <simon@deblan.fr>
|
||||||
*/
|
*/
|
||||||
class ExampleTest extends TestCase
|
class ExampleTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public function testExemple()
|
public function testExemple()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,19 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
|
||||||
use Deblan\Csv\CsvParser;
|
use Deblan\Csv\CsvParser;
|
||||||
use Deblan\CsvValidator\Validator;
|
use Deblan\CsvValidator\Validator;
|
||||||
use Symfony\Component\Validator\Validation;
|
use Symfony\Component\Validator\Validation;
|
||||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||||
use Symfony\Component\Validator\Constraints\Email;
|
use Symfony\Component\Validator\Constraints\Email;
|
||||||
|
|
||||||
class ValidatorTest extends TestCase
|
class ValidatorTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public function testViolation()
|
public function testViolation()
|
||||||
{
|
{
|
||||||
$parser = $this->generateParser('example.csv');
|
$parser = $this->generateParser('example.csv');
|
||||||
$validator = $this->generateValidator($parser);
|
$validator = $this->generateValidator($parser);
|
||||||
$this->expectException('\RuntimeException');
|
$this->setExpectedException('\RuntimeException');
|
||||||
$validator->isValid();
|
$validator->isValid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
|
||||||
use Symfony\Component\Validator\ConstraintViolation;
|
use Symfony\Component\Validator\ConstraintViolation;
|
||||||
use Deblan\CsvValidator\Violation;
|
use Deblan\CsvValidator\Violation;
|
||||||
|
|
||||||
class ViolationTest extends TestCase
|
class ViolationTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public function testViolation()
|
public function testViolation()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue