Fixed unit test

This commit is contained in:
Matias Griese
2020-05-05 19:04:56 +03:00
parent bdbd392c6e
commit 5f0380f547
3 changed files with 123 additions and 213 deletions

View File

@@ -54,7 +54,7 @@
"dragonmantank/cron-expression": "^1.2",
"phive/twig-extensions-deferred": "^1.0",
"willdurand/negotiation": "2.x-dev",
"itsgoingd/clockwork": "@beta",
"itsgoingd/clockwork": "^4.1",
"enshrined/svg-sanitize": "~0.1",
"symfony/http-client": "^4.4"
},
@@ -79,13 +79,10 @@
"php": "7.1.3"
}
},
"repositories": [{
"type": "vcs",
"url": "https://github.com/trilbymedia/PHP-Markdown-Documentation-Generator"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/itsgoingd/clockwork"
"url": "https://github.com/trilbymedia/PHP-Markdown-Documentation-Generator"
}
],
"autoload": {

306
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "993f670b144e15558dd801ffcc7dfc81",
"content-hash": "f1b19bd30c2a650efac9eca78af1630a",
"packages": [
{
"name": "antoligy/dom-string-iterators",
@@ -104,16 +104,6 @@
"ssl",
"tls"
],
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2020-04-08T08:27:21+00:00"
},
{
@@ -499,16 +489,16 @@
},
{
"name": "filp/whoops",
"version": "2.7.1",
"version": "2.7.2",
"source": {
"type": "git",
"url": "https://github.com/filp/whoops.git",
"reference": "fff6f1e4f36be0e0d0b84d66b413d9dcb0c49130"
"reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filp/whoops/zipball/fff6f1e4f36be0e0d0b84d66b413d9dcb0c49130",
"reference": "fff6f1e4f36be0e0d0b84d66b413d9dcb0c49130",
"url": "https://api.github.com/repos/filp/whoops/zipball/17d0d3f266c8f925ebd035cd36f83cf802b47d4a",
"reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a",
"shasum": ""
},
"require": {
@@ -556,7 +546,7 @@
"throwable",
"whoops"
],
"time": "2020-01-15T10:00:00+00:00"
"time": "2020-05-05T12:28:07+00:00"
},
{
"name": "gregwar/cache",
@@ -726,16 +716,16 @@
},
{
"name": "itsgoingd/clockwork",
"version": "v4.1.1",
"version": "v4.1.3",
"source": {
"type": "git",
"url": "https://github.com/itsgoingd/clockwork.git",
"reference": "5b149a708a74027404126abe05289ff10d9f0f1d"
"reference": "049a7dacfa8ee749bf792fcfb85515d09b0d94a6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/itsgoingd/clockwork/zipball/5b149a708a74027404126abe05289ff10d9f0f1d",
"reference": "5b149a708a74027404126abe05289ff10d9f0f1d",
"url": "https://api.github.com/repos/itsgoingd/clockwork/zipball/049a7dacfa8ee749bf792fcfb85515d09b0d94a6",
"reference": "049a7dacfa8ee749bf792fcfb85515d09b0d94a6",
"shasum": ""
},
"require": {
@@ -781,16 +771,10 @@
"slim"
],
"support": {
"source": "https://github.com/itsgoingd/clockwork/tree/v4.1.1",
"source": "https://github.com/itsgoingd/clockwork/tree/v4.1.3",
"issues": "https://github.com/itsgoingd/clockwork/issues"
},
"funding": [
{
"type": "github",
"url": "https://github.com/itsgoingd"
}
],
"time": "2020-04-15T15:10:57+00:00"
"time": "2020-05-02T21:02:52+00:00"
},
{
"name": "kodus/psr7-server",
@@ -1957,7 +1941,7 @@
},
{
"name": "symfony/console",
"version": "v4.4.7",
"version": "v4.4.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
@@ -2110,7 +2094,7 @@
},
{
"name": "symfony/event-dispatcher",
"version": "v4.4.7",
"version": "v4.4.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
@@ -2244,20 +2228,6 @@
],
"description": "Symfony HttpClient component",
"homepage": "https://symfony.com",
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-04-12T16:14:02+00:00"
},
{
@@ -2551,16 +2521,16 @@
},
{
"name": "symfony/process",
"version": "v4.4.7",
"version": "v4.4.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "3e40e87a20eaf83a1db825e1fa5097ae89042db3"
"reference": "4b6a9a4013baa65d409153cbb5a895bf093dc7f4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/3e40e87a20eaf83a1db825e1fa5097ae89042db3",
"reference": "3e40e87a20eaf83a1db825e1fa5097ae89042db3",
"url": "https://api.github.com/repos/symfony/process/zipball/4b6a9a4013baa65d409153cbb5a895bf093dc7f4",
"reference": "4b6a9a4013baa65d409153cbb5a895bf093dc7f4",
"shasum": ""
},
"require": {
@@ -2596,20 +2566,20 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
"time": "2020-03-27T16:54:36+00:00"
"time": "2020-04-15T15:56:18+00:00"
},
{
"name": "symfony/var-dumper",
"version": "v4.4.7",
"version": "v4.4.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "5a0c2d93006131a36cf6f767d10e2ca8333b0d4a"
"reference": "c587e04ce5d1aa62d534a038f574d9a709e814cf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/5a0c2d93006131a36cf6f767d10e2ca8333b0d4a",
"reference": "5a0c2d93006131a36cf6f767d10e2ca8333b0d4a",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/c587e04ce5d1aa62d534a038f574d9a709e814cf",
"reference": "c587e04ce5d1aa62d534a038f574d9a709e814cf",
"shasum": ""
},
"require": {
@@ -2672,20 +2642,20 @@
"debug",
"dump"
],
"time": "2020-03-27T16:54:36+00:00"
"time": "2020-04-12T16:14:02+00:00"
},
{
"name": "symfony/yaml",
"version": "v4.4.7",
"version": "v4.4.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "ef166890d821518106da3560086bfcbeb4fadfec"
"reference": "b385dce1c0e9f839b384af90188638819433e252"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/ef166890d821518106da3560086bfcbeb4fadfec",
"reference": "ef166890d821518106da3560086bfcbeb4fadfec",
"url": "https://api.github.com/repos/symfony/yaml/zipball/b385dce1c0e9f839b384af90188638819433e252",
"reference": "b385dce1c0e9f839b384af90188638819433e252",
"shasum": ""
},
"require": {
@@ -2731,7 +2701,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2020-03-30T11:41:10+00:00"
"time": "2020-04-28T17:55:16+00:00"
},
{
"name": "twig/twig",
@@ -3075,6 +3045,61 @@
"description": "Flexible Stub wrapper for PHPUnit's Mock Builder",
"time": "2019-03-02T15:35:10+00:00"
},
{
"name": "composer/package-versions-deprecated",
"version": "1.8.0",
"source": {
"type": "git",
"url": "https://github.com/composer/package-versions-deprecated.git",
"reference": "98df7f1b293c0550bd5b1ce6b60b59bdda23aa47"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/98df7f1b293c0550bd5b1ce6b60b59bdda23aa47",
"reference": "98df7f1b293c0550bd5b1ce6b60b59bdda23aa47",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.1.0 || ^2.0",
"php": "^7"
},
"replace": {
"ocramius/package-versions": "1.2 - 1.8.99"
},
"require-dev": {
"composer/composer": "^1.9.3 || ^2.0@dev",
"ext-zip": "^1.13",
"phpunit/phpunit": "^6.5 || ^7"
},
"type": "composer-plugin",
"extra": {
"class": "PackageVersions\\Installer",
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"PackageVersions\\": "src/PackageVersions"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be"
}
],
"description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
"time": "2020-04-23T11:49:37+00:00"
},
{
"name": "composer/xdebug-handler",
"version": "1.4.1",
@@ -3117,12 +3142,6 @@
"Xdebug",
"performance"
],
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
}
],
"time": "2020-03-01T12:26:26+00:00"
},
{
@@ -3412,20 +3431,20 @@
},
{
"name": "jean85/pretty-package-versions",
"version": "1.2",
"version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/Jean85/pretty-package-versions.git",
"reference": "75c7effcf3f77501d0e0caa75111aff4daa0dd48"
"reference": "e3517fb11b67e798239354fe8213927d012ad8f9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/75c7effcf3f77501d0e0caa75111aff4daa0dd48",
"reference": "75c7effcf3f77501d0e0caa75111aff4daa0dd48",
"url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/e3517fb11b67e798239354fe8213927d012ad8f9",
"reference": "e3517fb11b67e798239354fe8213927d012ad8f9",
"shasum": ""
},
"require": {
"ocramius/package-versions": "^1.2.0",
"composer/package-versions-deprecated": "^1.8.0",
"php": "^7.0"
},
"require-dev": {
@@ -3459,7 +3478,7 @@
"release",
"versions"
],
"time": "2018-06-13T13:22:40+00:00"
"time": "2020-04-24T14:19:45+00:00"
},
{
"name": "myclabs/deep-copy",
@@ -4090,56 +4109,6 @@
],
"time": "2020-04-10T16:34:50+00:00"
},
{
"name": "ocramius/package-versions",
"version": "1.4.2",
"source": {
"type": "git",
"url": "https://github.com/Ocramius/PackageVersions.git",
"reference": "44af6f3a2e2e04f2af46bcb302ad9600cba41c7d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/44af6f3a2e2e04f2af46bcb302ad9600cba41c7d",
"reference": "44af6f3a2e2e04f2af46bcb302ad9600cba41c7d",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.0.0",
"php": "^7.1.0"
},
"require-dev": {
"composer/composer": "^1.6.3",
"doctrine/coding-standard": "^5.0.1",
"ext-zip": "*",
"infection/infection": "^0.7.1",
"phpunit/phpunit": "^7.5.17"
},
"type": "composer-plugin",
"extra": {
"class": "PackageVersions\\Installer",
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-4": {
"PackageVersions\\": "src/PackageVersions"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com"
}
],
"description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
"time": "2019-11-15T16:17:10+00:00"
},
{
"name": "phar-io/manifest",
"version": "1.0.3",
@@ -4244,24 +4213,21 @@
},
{
"name": "phpdocumentor/reflection-common",
"version": "2.0.0",
"version": "2.1.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
"reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a"
"reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a",
"reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
"reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"require-dev": {
"phpunit/phpunit": "~6"
},
"type": "library",
"extra": {
"branch-alias": {
@@ -4292,7 +4258,7 @@
"reflection",
"static analysis"
],
"time": "2018-08-07T13:53:10+00:00"
"time": "2020-04-27T09:25:28+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
@@ -5533,7 +5499,7 @@
},
{
"name": "symfony/browser-kit",
"version": "v4.4.7",
"version": "v4.4.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
@@ -5588,25 +5554,11 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-03-28T10:15:50+00:00"
},
{
"name": "symfony/css-selector",
"version": "v4.4.7",
"version": "v4.4.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
@@ -5655,25 +5607,11 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-03-27T16:54:36+00:00"
},
{
"name": "symfony/dom-crawler",
"version": "v4.4.7",
"version": "v4.4.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
@@ -5730,25 +5668,11 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-03-29T19:12:22+00:00"
},
{
"name": "symfony/finder",
"version": "v4.4.7",
"version": "v4.4.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
@@ -5793,20 +5717,6 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-03-27T16:54:36+00:00"
},
{
@@ -5869,20 +5779,6 @@
"portable",
"shim"
],
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-03-09T19:04:49+00:00"
},
{
@@ -6024,7 +5920,6 @@
"minimum-stability": "stable",
"stability-flags": {
"willdurand/negotiation": 20,
"itsgoingd/clockwork": 10,
"victorjonsson/markdowndocs": 20
},
"prefer-stable": false,
@@ -6041,6 +5936,5 @@
"platform-dev": [],
"platform-overrides": {
"php": "7.1.3"
},
"plugin-api-version": "1.1.0"
}
}

View File

@@ -1,6 +1,8 @@
<?php
use Grav\Common\Config\Config;
use Grav\Common\Data\Blueprint;
use Grav\Common\Grav;
/**
* Class InstallCommandTest
@@ -29,7 +31,6 @@ class BlueprintTest extends \Codeception\TestCase\Test
/**
* @depends testValidateStrict
* @expectedException Grav\Common\Data\ValidationException
*/
public function testValidateStrictExtra()
{
@@ -38,6 +39,24 @@ class BlueprintTest extends \Codeception\TestCase\Test
$blueprint->validate(['test' => 'string', 'wrong' => 'field']);
}
/**
* @depends testValidateStrict
* @expectedException Grav\Common\Data\ValidationException
*/
public function testValidateStrictExtraException()
{
$blueprint = $this->loadBlueprint('strict');
/** @var Config $config */
$config = Grav::instance()['config'];
$var = 'system.strict_mode.blueprint_strict_compat';
$config->set($var, false);
$blueprint->validate(['test' => 'string', 'wrong' => 'field']);
$config->set($var, true);
}
/**
* @param string $filename
* @return Blueprint