Init #7
Annotations
11 errors
|
🧪 PHPUnit Tests:
tests/Blueprint/MiscTest.php#L112
JBZoo\PHPUnit\Blueprint\MiscTest::testCheckJsonSchemaExampleInReadme
The file doesn't contain expected text.
See: README.md
Expected text:
--------------------------------------------------------------------------------
<details>
<summary>Click to see: JSON Format</summary>
```json
{
"csv_structure" : {
"header" : true,
"delimiter" : ",",
"quote_char" : "\\",
"enclosure" : "\"",
"encoding" : "utf-8",
"bom" : false
},
"columns" : [
{
"name" : "csv_header_name",
"description" : "Lorem ipsum",
"rules" : {
"not_empty" : true,
"exact_value" : "Some string",
"allow_values" : ["y", "n", ""],
"regex" : "\/^[\\d]{2}$\/",
"min_length" : 1,
"max_length" : 10,
"only_trimed" : true,
"only_lowercase" : true,
"only_uppercase" : true,
"only_capitalize" : true,
"min" : 10,
"max" : 100.5,
"precision" : 2,
"date_format" : "Y-m-d",
"min_date" : "2000-01-02",
"max_date" : "+1 day",
"is_bool" : true,
"is_int" : true,
"is_float" : true,
"is_ip" : true,
"is_url" : true,
"is_email" : true,
"is_domain" : true,
"is_uuid4" : true,
"is_latitude" : true,
"is_longitude" : true,
"cardinal_direction" : true,
"usa_market_name" : true
}
}
]
}
```
</details>
--------------------------------------------------------------------------------
Failed asserting that false is true.
vendor/jbzoo/phpunit/src/functions/aliases.php:79
vendor/jbzoo/phpunit/src/functions/aliases.php:439
tests/Blueprint/MiscTest.php:150
tests/Blueprint/MiscTest.php:114
|
🧪 PHPUnit Tests:
tests/Blueprint/MiscTest.php#L107
JBZoo\PHPUnit\Blueprint\MiscTest::testCheckPhpSchemaExampleInReadme
The file doesn't contain expected text.
See: README.md
Expected text:
--------------------------------------------------------------------------------
<details>
<summary>Click to see: PHP Array as file</summary>
```php
<?php
declare(strict_types=1);
return [
'csv_structure' => [
'header' => true,
'delimiter' => ',',
'quote_char' => '\\',
'enclosure' => '"',
'encoding' => 'utf-8',
'bom' => false,
],
'columns' => [
[
'name' => 'csv_header_name',
'description' => 'Lorem ipsum',
'rules' => [
'not_empty' => true,
'exact_value' => 'Some string',
'allow_values' => ['y', 'n', ''],
'regex' => '/^[\\d]{2}$/',
'min_length' => 1,
'max_length' => 10,
'only_trimed' => true,
'only_lowercase' => true,
'only_uppercase' => true,
'only_capitalize' => true,
'min' => 10,
'max' => 100.5,
'precision' => 2,
'date_format' => 'Y-m-d',
'min_date' => '2000-01-02',
'max_date' => '+1 day',
'is_bool' => true,
'is_int' => true,
'is_float' => true,
'is_ip' => true,
'is_url' => true,
'is_email' => true,
'is_domain' => true,
'is_uuid4' => true,
'is_latitude' => true,
'is_longitude' => true,
'cardinal_direction' => true,
'usa_market_name' => true,
],
],
],
];
```
</details>
--------------------------------------------------------------------------------
Failed asserting that false is true.
vendor/jbzoo/phpunit/src/functions/aliases.php:79
vendor/jbzoo/phpunit/src/functions/aliases.php:439
tests/Blueprint/MiscTest.php:150
tests/Blueprint/MiscTest.php:109
|
🧪 PHPUnit Tests:
tests/Blueprint/MiscTest.php#L87
JBZoo\PHPUnit\Blueprint\MiscTest::testCsvStrutureDefaultValues
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
-Array &0 ()
+Array &0 (
+ 'header' => true
+ 'delimiter' => ','
+ 'quote_char' => '\'
+ 'enclosure' => '"'
+ 'encoding' => 'utf-8'
+ 'bom' => false
+)
vendor/jbzoo/phpunit/src/functions/aliases.php:129
tests/Blueprint/MiscTest.php:94
|
🧪 PHPUnit Tests:
tests/Blueprint/MiscTest.php#L97
JBZoo\PHPUnit\Blueprint\MiscTest::testCheckYmlSchemaExampleInReadme
The file doesn't contain expected text.
See: README.md
Expected text:
--------------------------------------------------------------------------------
<details>
<summary>Click to see: YAML format (with comment)</summary>
```yml
# It's a full example of the CSV schema file in YAML format.
csv_structure: # Here are default values. You can skip this section if you don't need to override the default values
header: true # If the first row is a header. If true, name of each column is required
delimiter: , # Delimiter character in CSV file
quote_char: \ # Quote character in CSV file
enclosure: "\"" # Enclosure for each field in CSV file
encoding: utf-8 # Only utf-8, utf-16, utf-32 (Experimental)
bom: false # If the file has a BOM (Byte Order Mark) at the beginning (Experimental)
columns:
- name: "csv_header_name" # Any custom name of the column in the CSV file (first row). Required if "csv_structure.header" is true.
description: "Lorem ipsum" # Optional. Description of the column. Not used in the validation process.
rules:
# You can use the rules in any combination. Or not use any of them.
# They are grouped below simply for ease of navigation and reading.
# If you see the value for the rule is "true" - that's just an enable flag.
# In other cases, these are rule parameters.
# General rules
not_empty: true # Value is not empty string. Ignore spaces.
exact_value: Some string # Case-sensitive. Exact value for string in the column
allow_values: [ y, n, "" ] # Strict set of values that are allowed. Case-sensitive.
# Strings only
regex: /^[\d]{2}$/ # Any valid regex pattern. See https://www.php.net/manual/en/reference.pcre.pattern.syntax.php
min_length: 1 # Integer only. Min length of the string with spaces
max_length: 10 # Integer only. Max length of the string with spaces
only_trimed: true # Only trimed strings. Example: "Hello World" (not " Hello World ")
only_lowercase: true # String is only lower-case. Example: "hello world"
only_uppercase: true # String is only upper-case. Example: "HELLO WORLD"
only_capitalize: true # String is only capitalized. Example: "Hello World"
# Deciaml and integer numbers
min: 10 # Can be integer or float, negative and positive
max: 100.50 # Can be integer or float, negative and positive
precision: 2 # Strict(!) number of digits after the decimal point
# Dates
date_format: Y-m-d # See: https://www.php.net/manual/en/datetime.format.php
min_date: "2000-01-02" # See examples https://www.php.net/manual/en/function.strtotime.php
max_date: "+1 day" # See examples https://www.php.net/manual/en/function.strtotime.php
# Specific formats
is_bool: true # Allow only boolean values "true" and "false", case-insensitive
is_int: true # Check format only. Can be negative and positive. Without any separators
is_float: true # Check format only. Can be negative and positive. Dot as decimal separator
is_ip: true # Only IPv4. Example: "127.0.0.1"
is_url: true # Only URL format. Example: "https://example.com/page?query=string#anchor"
is_email: true # Only email format. Example: "user@example.com"
is_domain: true # Only domain name. Example: "example.com"
is_uuid4: true # Only UUID4 format. Example: "550e8400-e29b-41d4-a716-446655440000"
is_latitude: true
|
🧪 PHPUnit Tests:
tests/Blueprint/CsvReaderTest.php#L50
JBZoo\PHPUnit\Blueprint\CsvReaderTest::testReadCsvFileWithHeader
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'tests/fixtures/simple_header.csv'
+'./tests/fixtures/simple_header.csv'
vendor/jbzoo/phpunit/src/functions/aliases.php:129
tests/Blueprint/CsvReaderTest.php:53
|
🧪 PHPUnit Tests:
tests/Blueprint/CsvReaderTest.php#L32
JBZoo\PHPUnit\Blueprint\CsvReaderTest::testReadCsvFileWithoutHeader
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'tests/fixtures/simple_no_header.csv'
+'./tests/fixtures/simple_no_header.csv'
vendor/jbzoo/phpunit/src/functions/aliases.php:129
tests/Blueprint/CsvReaderTest.php:35
|
🧪 PHPUnit Tests:
tests/Blueprint/ValidatorTest.php#L204
JBZoo\PHPUnit\Blueprint\ValidatorTest::testPrecision
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'"precision" at line 2, column "seq (0)". Value "1" has a precision of 0 but should have a precision of 1.'
+'"precision" at line 2, column "0:seq". Value "1" has a precision of 0 but should have a precision of 1.'
vendor/jbzoo/phpunit/src/functions/aliases.php:129
tests/Blueprint/ValidatorTest.php:210
|
🧪 PHPUnit Tests:
tests/Blueprint/ValidatorTest.php#L315
JBZoo\PHPUnit\Blueprint\ValidatorTest::testIsInt
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'"is_int" at line 2, column "bool (0)". Value "true" is not an integer.'
+'"is_int" at line 2, column "0:bool". Value "true" is not an integer.'
vendor/jbzoo/phpunit/src/functions/aliases.php:129
tests/Blueprint/ValidatorTest.php:321
|
🧪 PHPUnit Tests:
tests/Blueprint/ValidatorTest.php#L81
JBZoo\PHPUnit\Blueprint\ValidatorTest::testMin
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'"min" at line 2, column "seq (0)". Value "1" is less than "10".'
+'"min" at line 2, column "0:seq". Value "1" is less than "10".'
vendor/jbzoo/phpunit/src/functions/aliases.php:129
tests/Blueprint/ValidatorTest.php:87
|
🧪 PHPUnit Tests:
tests/Blueprint/ValidatorTest.php#L244
JBZoo\PHPUnit\Blueprint\ValidatorTest::testMaxDate
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'"max_date" at line 23, column "date (0)". Value "2120/02/01" is more than the maximum date "2120-01-01T00:00:00.000+00:00".'
+'"max_date" at line 23, column "0:date". Value "2120/02/01" is more than the maximum date "2120-01-01T00:00:00.000+00:00".'
vendor/jbzoo/phpunit/src/functions/aliases.php:129
tests/Blueprint/ValidatorTest.php:250
|
Loading