Init #2
Annotations
7 errors
|
🧪 PHPUnit Tests:
tests/Blueprint/MiscTest.php#L103
JBZoo\PHPUnit\Blueprint\MiscTest::testCheckPhpSchemaExampleInReadme
Undefined variable $tmpl
tests/Blueprint/MiscTest.php:139
tests/Blueprint/MiscTest.php:105
|
🧪 PHPUnit Tests:
tests/Blueprint/MiscTest.php#L98
JBZoo\PHPUnit\Blueprint\MiscTest::testCheckYmlSchemaExampleInReadme
The file doesn't contain expected text.
See: README.md
Expected text:
--------------------------------------------------------------------------------
<details>
<summary>Click to see YAML format</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"
description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
rules:
allow_values: [ y, n, "" ] # Strict set of values that are allowed
date_format: Y-m-d # See: https://www.php.net/manual/en/datetime.format.php
exact_value: Some string # Case-sensitive. Exact value for string in the column
is_bool: true # true|false, Case-insensitive
is_domain: true # Only domain name. Example: "example.com"
is_email: true # Only email format. Example: "user@example.com"
is_float: true # Check format only. Can be negative and positive. Dot as decimal separator
is_int: true # Check format only. Can be negative and positive. Without any separators
is_ip: true # Only IPv4. Example: "127.0.0.1"
is_latitude: true # Can be integer or float. Example: 50.123456
is_longitude: true # Can be integer or float. Example: -89.123456
is_url: true # Only URL format. Example: "https://example.com/page?query=string#anchor"
is_uuid4: true # Only UUID4 format. Example: "550e8400-e29b-41d4-a716-446655440000"
min: 10 # Can be integer or float, negative and positive
max: 100 # Can be integer or float, negative and positive
min_length: 1 # Integer only. Min length of the string with spaces
max_length: 10 # Integer only. Max length of the string with spaces
min_date: "2000-01-02" # See examples https://www.php.net/manual/en/function.strtotime.php
max_date: now # See examples https://www.php.net/manual/en/function.strtotime.php
not_empty: true # Value is not empty string. Ignore spaces.
only_capitalize: true # String is only capitalized. Example: "Hello World"
only_lowercase: true # String is only lowercase. Example: "hello world"
only_uppercase: true # String is only capitalized. Example: "HELLO WORLD"
only_trimed: true # Only trimed strings. Example: "Hello World" (not " Hello World ")
precision: 2 # Strict(!) number of digits after the decimal point
regex: /^[\d]{2}$/ # Any valid regex pattern. See https://www.php.net/manual/en/reference.pcre.pattern.syntax.php
cardinal_direction: true # Valid cardinal direction. Examples: "N", "S", "NE", "SE", "none", ""
usa_market_name: true # Check if the value is a valid USA market name. Example: "New York, NY"
```
</details>
--------------------------------------------------------------------------------
Failed asserting that false is true.
vendor/jbzoo/phpunit/src/functions/aliases.php:79
vendor/jbzoo/phpunit/src/functions/aliases.php:439
tests/Bluepri
|
🧪 PHPUnit Tests:
tests/Blueprint/MiscTest.php#L108
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 dolor sit amet, consectetur adipiscing elit.",
"rules" : {
"allow_values" : ["y", "n", ""],
"date_format" : "Y-m-d",
"exact_value" : "Some string",
"is_bool" : true,
"is_domain" : true,
"is_email" : true,
"is_float" : true,
"is_int" : true,
"is_ip" : true,
"is_latitude" : true,
"is_longitude" : true,
"is_url" : true,
"is_uuid4" : true,
"min" : 10,
"max" : 100,
"min_length" : 1,
"max_length" : 10,
"min_date" : '2000-01-02',
"max_date" : "now",
"not_empty" : true,
"only_capitalize" : true,
"only_lowercase" : true,
"only_uppercase" : true,
"only_trimed" : true,
"precision" : 2,
"regex" : "\/^[\\d]{2}$\/",
"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:141
tests/Blueprint/MiscTest.php:110
|
🧪 PHPUnit Tests:
tests/Blueprint/MiscTest.php#L113
JBZoo\PHPUnit\Blueprint\MiscTest::testCompareExamplesWithOrig
JSON config is invalid
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
-Array &0 (
- 'csv_structure' => Array &1 (
- 'header' => true
- 'delimiter' => ','
- 'quote_char' => '\'
- 'enclosure' => '"'
- 'encoding' => 'utf-8'
- 'bom' => false
- )
- 'columns' => Array &2 (
- 0 => Array &3 (
- 'name' => 'csv header name'
- 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
- 'rules' => Array &4 (
- 'allow_values' => Array &5 (
- 0 => 'y'
- 1 => 'n'
- 2 => ''
- )
- 'date_format' => 'Y-m-d'
- 'exact_value' => 'Some string'
- 'is_bool' => true
- 'is_domain' => true
- 'is_email' => true
- 'is_float' => true
- 'is_int' => true
- 'is_ip' => true
- 'is_latitude' => true
- 'is_longitude' => true
- 'is_url' => true
- 'is_uuid4' => true
- 'min' => 10
- 'max' => 100
- 'min_length' => 1
- 'max_length' => 10
- 'min_date' => '2000-01-02'
- 'max_date' => 'now'
- 'not_empty' => true
- 'only_capitalize' => true
- 'only_lowercase' => true
- 'only_uppercase' => true
- 'only_trimed' => true
- 'precision' => 2
- 'regex' => '/^[\d]{2}$/'
- 'cardinal_direction' => true
- 'usa_market_name' => true
- )
- )
- )
-)
+Array &0 ()
vendor/jbzoo/phpunit/src/functions/aliases.php:129
tests/Blueprint/MiscTest.php:120
|
🧪 PHPUnit Tests:
tests/Blueprint/SchemaTest.php#L53
JBZoo\PHPUnit\Blueprint\SchemaTest::testScvStruture
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
Array &0 (
- 'inherit' => null
- 'bom' => false
+ 'header' => true
'delimiter' => ','
'quote_char' => '\'
'enclosure' => '"'
'encoding' => 'utf-8'
- 'header' => true
- 'strict_column_order' => false
- 'other_columns_possible' => false
+ 'bom' => false
)
vendor/jbzoo/phpunit/src/functions/aliases.php:129
tests/Blueprint/SchemaTest.php:56
|
🧪 PHPUnit Tests
Process completed with exit code 2.
|
Loading