mirror of
https://github.com/cerbero90/json-parser.git
synced 2025-07-26 08:31:25 +02:00
18 lines
591 B
PHP
18 lines
591 B
PHP
<?php
|
|
|
|
use Cerbero\JsonParser\Dataset;
|
|
use Cerbero\JsonParser\JsonParser;
|
|
|
|
|
|
it('parses JSON when instantiated', function (string $json, array $parsed) {
|
|
expect(new JsonParser($json))->toParseTo($parsed);
|
|
})->with(Dataset::forParsing());
|
|
|
|
it('parses JSON when calling the factory method', function (string $json, array $parsed) {
|
|
expect(JsonParser::parse($json))->toParseTo($parsed);
|
|
})->with(Dataset::forParsing());
|
|
|
|
it('parses JSON when calling the helper', function (string $json, array $parsed) {
|
|
expect(parseJson($json))->toParseTo($parsed);
|
|
})->with(Dataset::forParsing());
|