From 4f71b944779b6ce2fb198462046cc96d9d9c42f1 Mon Sep 17 00:00:00 2001 From: Przemyslaw Skierniewski Date: Sun, 19 Mar 2017 18:56:59 +0100 Subject: [PATCH] Fixes after files upload refactor --- .env.testing | 2 +- app/Providers/AppServiceProvider.php | 12 + composer.json | 3 +- composer.lock | 439 +++++++++++++----- config/filesystems.php | 4 + tests/_support/FunctionalTester.php | 10 +- .../_generated/FunctionalTesterActions.php | 134 +++++- .../_support/_generated/UnitTesterActions.php | 2 +- 8 files changed, 466 insertions(+), 140 deletions(-) diff --git a/.env.testing b/.env.testing index 5ccbc154..48d1c43e 100644 --- a/.env.testing +++ b/.env.testing @@ -38,4 +38,4 @@ PUSHER_APP_ID= PUSHER_KEY= PUSHER_SECRET= -UPLOAD_DISK=uploads \ No newline at end of file +UPLOAD_DISK=test \ No newline at end of file diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 356dc175..38a713b9 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -5,6 +5,8 @@ use Barryvdh\Debugbar\ServiceProvider as DebugbarServiceProvider; use Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider; use Illuminate\Support\ServiceProvider; +use League\Flysystem\Adapter\NullAdapter; +use League\Flysystem\Filesystem; class AppServiceProvider extends ServiceProvider { @@ -15,6 +17,16 @@ class AppServiceProvider extends ServiceProvider */ public function boot() { + if(env('APP_ENV') === 'testing'){ + // Use null adapter for tests + app('filesystem')->extend( + 'nullAdapter', + function () { + return new Filesystem(new NullAdapter()); + } + ); + } + view()->composer( 'includes.disqus.disqus', function ($view) { diff --git a/composer.json b/composer.json index f6f398e1..217ded8b 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,8 @@ "gzero/cms": "dev-master", "gzero/api": "dev-master", "gzero/admin": "dev-master", - "predis/predis": "^1.1" + "predis/predis": "^1.1", + "league/flysystem-aws-s3-v3": "^1.0" }, "require-dev": { "barryvdh/laravel-ide-helper": "2.2.*", diff --git a/composer.lock b/composer.lock index f49334b3..7209b447 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,89 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "45a8751f8c43e45b6c583b2ca855c846", + "hash": "046acf01475edc2195c1b062b225d488", + "content-hash": "cd9198f510f150679d9d974a52caf8cc", "packages": [ + { + "name": "aws/aws-sdk-php", + "version": "3.24.4", + "source": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-php.git", + "reference": "2823e0a0742505f655b0cb3bcdb10844f60e6078" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2823e0a0742505f655b0cb3bcdb10844f60e6078", + "reference": "2823e0a0742505f655b0cb3bcdb10844f60e6078", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^5.3.1|^6.2.1", + "guzzlehttp/promises": "~1.0", + "guzzlehttp/psr7": "^1.3.1, !=1.4.0", + "mtdowling/jmespath.php": "~2.2", + "php": ">=5.5" + }, + "require-dev": { + "andrewsville/php-token-reflection": "^1.4", + "aws/aws-php-sns-message-validator": "~1.0", + "behat/behat": "~3.0", + "doctrine/cache": "~1.4", + "ext-dom": "*", + "ext-json": "*", + "ext-openssl": "*", + "ext-pcre": "*", + "ext-simplexml": "*", + "ext-spl": "*", + "nette/neon": "^2.3", + "phpunit/phpunit": "~4.0|~5.0", + "psr/cache": "^1.0" + }, + "suggest": { + "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", + "doctrine/cache": "To use the DoctrineCacheAdapter", + "ext-curl": "To send requests using cURL", + "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Aws\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Amazon Web Services", + "homepage": "http://aws.amazon.com" + } + ], + "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", + "homepage": "http://aws.amazon.com/sdkforphp", + "keywords": [ + "amazon", + "aws", + "cloud", + "dynamodb", + "ec2", + "glacier", + "s3", + "sdk" + ], + "time": "2017-03-14 00:56:44" + }, { "name": "barryvdh/laravel-cors", "version": "v0.8.2", @@ -57,7 +138,7 @@ "crossdomain", "laravel" ], - "time": "2016-08-11T08:46:01+00:00" + "time": "2016-08-11 08:46:01" }, { "name": "bkwld/croppa", @@ -106,7 +187,7 @@ } ], "description": "Image thumbnail creation through specially formatted URLs for Laravel", - "time": "2016-09-08T16:24:58+00:00" + "time": "2016-09-08 16:24:58" }, { "name": "classpreloader/classpreloader", @@ -160,7 +241,7 @@ "class", "preload" ], - "time": "2016-09-16T12:50:15+00:00" + "time": "2016-09-16 12:50:15" }, { "name": "davejamesmiller/laravel-breadcrumbs", @@ -209,7 +290,7 @@ "keywords": [ "laravel" ], - "time": "2017-01-30T21:16:53+00:00" + "time": "2017-01-30 21:16:53" }, { "name": "dnoegel/php-xdg-base-dir", @@ -242,7 +323,7 @@ "MIT" ], "description": "implementation of xdg base directory specification for php", - "time": "2014-10-24T07:27:01+00:00" + "time": "2014-10-24 07:27:01" }, { "name": "doctrine/inflector", @@ -309,7 +390,7 @@ "singularize", "string" ], - "time": "2015-11-06T14:35:42+00:00" + "time": "2015-11-06 14:35:42" }, { "name": "filp/whoops", @@ -370,7 +451,7 @@ "whoops", "zf2" ], - "time": "2017-03-07T09:04:45+00:00" + "time": "2017-03-07 09:04:45" }, { "name": "firebase/php-jwt", @@ -413,7 +494,7 @@ ], "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", "homepage": "https://github.com/firebase/php-jwt", - "time": "2016-07-18T04:51:16+00:00" + "time": "2016-07-18 04:51:16" }, { "name": "flow/jsonpath", @@ -454,7 +535,7 @@ } ], "description": "JSONPath implementation for parsing, searching and flattening arrays", - "time": "2016-09-06T17:43:18+00:00" + "time": "2016-09-06 17:43:18" }, { "name": "guzzlehttp/guzzle", @@ -516,7 +597,7 @@ "rest", "web service" ], - "time": "2017-02-28T22:50:30+00:00" + "time": "2017-02-28 22:50:30" }, { "name": "guzzlehttp/promises", @@ -567,7 +648,7 @@ "keywords": [ "promise" ], - "time": "2016-12-20T10:07:11+00:00" + "time": "2016-12-20 10:07:11" }, { "name": "guzzlehttp/psr7", @@ -632,7 +713,7 @@ "uri", "url" ], - "time": "2017-02-27T10:51:17+00:00" + "time": "2017-02-27 10:51:17" }, { "name": "gzero/admin", @@ -640,18 +721,18 @@ "source": { "type": "git", "url": "https://github.com/GrupaZero/admin.git", - "reference": "c0020f2b7ad7f420dab4ee11a5836b81f52a7b79" + "reference": "cc9ce36b87f982eec483ec4eb640bc48fa942f4a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrupaZero/admin/zipball/c0020f2b7ad7f420dab4ee11a5836b81f52a7b79", - "reference": "c0020f2b7ad7f420dab4ee11a5836b81f52a7b79", + "url": "https://api.github.com/repos/GrupaZero/admin/zipball/cc9ce36b87f982eec483ec4eb640bc48fa942f4a", + "reference": "cc9ce36b87f982eec483ec4eb640bc48fa942f4a", "shasum": "" }, "require": { "gzero/core": "dev-master", "illuminate/routing": "5.3.*", - "php": ">=7.0.0" + "php": ">=7.1.0" }, "require-dev": { "phpunit/phpunit": "5.6.*" @@ -679,7 +760,7 @@ "gzero cms", "laravel" ], - "time": "2017-01-03T18:19:45+00:00" + "time": "2017-03-19 16:27:01" }, { "name": "gzero/api", @@ -687,12 +768,12 @@ "source": { "type": "git", "url": "https://github.com/GrupaZero/api.git", - "reference": "2ec3616aa879a36dce516a823b8c9036e911dd58" + "reference": "bfe556017ab77560b6fadabaef88b4d44626fe14" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrupaZero/api/zipball/2ec3616aa879a36dce516a823b8c9036e911dd58", - "reference": "2ec3616aa879a36dce516a823b8c9036e911dd58", + "url": "https://api.github.com/repos/GrupaZero/api/zipball/bfe556017ab77560b6fadabaef88b4d44626fe14", + "reference": "bfe556017ab77560b6fadabaef88b4d44626fe14", "shasum": "" }, "require": { @@ -741,7 +822,7 @@ "cms", "laravel" ], - "time": "2017-02-03T19:47:56+00:00" + "time": "2017-03-19 16:49:54" }, { "name": "gzero/cms", @@ -749,12 +830,12 @@ "source": { "type": "git", "url": "https://github.com/GrupaZero/cms.git", - "reference": "6b2e68553e59770ef5e019a1d12d25326e693930" + "reference": "5c2b58e020ab9532367254d74e3dfc0ecc4bf90c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrupaZero/cms/zipball/6b2e68553e59770ef5e019a1d12d25326e693930", - "reference": "6b2e68553e59770ef5e019a1d12d25326e693930", + "url": "https://api.github.com/repos/GrupaZero/cms/zipball/5c2b58e020ab9532367254d74e3dfc0ecc4bf90c", + "reference": "5c2b58e020ab9532367254d74e3dfc0ecc4bf90c", "shasum": "" }, "require": { @@ -807,7 +888,7 @@ "framework", "laravel" ], - "time": "2017-03-17T09:31:46+00:00" + "time": "2017-03-19 15:04:45" }, { "name": "gzero/eloquent-tree", @@ -855,7 +936,7 @@ "eloquent", "laravel" ], - "time": "2017-02-15T16:24:49+00:00" + "time": "2017-02-15 16:24:49" }, { "name": "jakub-onderka/php-console-color", @@ -898,7 +979,7 @@ "homepage": "http://www.acci.cz" } ], - "time": "2014-04-08T15:00:19+00:00" + "time": "2014-04-08 15:00:19" }, { "name": "jakub-onderka/php-console-highlighter", @@ -942,7 +1023,7 @@ "homepage": "http://www.acci.cz/" } ], - "time": "2015-04-20T18:58:01+00:00" + "time": "2015-04-20 18:58:01" }, { "name": "jeremeamia/SuperClosure", @@ -1000,7 +1081,7 @@ "serialize", "tokenizer" ], - "time": "2016-12-07T09:37:55+00:00" + "time": "2016-12-07 09:37:55" }, { "name": "laravel/framework", @@ -1128,7 +1209,7 @@ "framework", "laravel" ], - "time": "2017-01-26T14:29:55+00:00" + "time": "2017-01-26 14:29:55" }, { "name": "laravel/passport", @@ -1192,7 +1273,7 @@ "oauth", "passport" ], - "time": "2016-12-21T13:51:02+00:00" + "time": "2016-12-21 13:51:02" }, { "name": "lcobucci/jwt", @@ -1250,7 +1331,7 @@ "JWS", "jwt" ], - "time": "2016-10-31T20:09:32+00:00" + "time": "2016-10-31 20:09:32" }, { "name": "league/event", @@ -1300,20 +1381,20 @@ "event", "listener" ], - "time": "2015-05-21T12:24:47+00:00" + "time": "2015-05-21 12:24:47" }, { "name": "league/flysystem", - "version": "1.0.35", + "version": "1.0.36", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "dda7f3ab94158a002d9846a97dc18ebfb7acc062" + "reference": "d9c1698582dfbfbd092ec9c5c3325f862cdb3297" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/dda7f3ab94158a002d9846a97dc18ebfb7acc062", - "reference": "dda7f3ab94158a002d9846a97dc18ebfb7acc062", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/d9c1698582dfbfbd092ec9c5c3325f862cdb3297", + "reference": "d9c1698582dfbfbd092ec9c5c3325f862cdb3297", "shasum": "" }, "require": { @@ -1383,7 +1464,54 @@ "sftp", "storage" ], - "time": "2017-02-09T11:33:58+00:00" + "time": "2017-03-18 16:02:30" + }, + { + "name": "league/flysystem-aws-s3-v3", + "version": "1.0.13", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git", + "reference": "dc56a8faf3aff0841f9eae04b6af94a50657896c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/dc56a8faf3aff0841f9eae04b6af94a50657896c", + "reference": "dc56a8faf3aff0841f9eae04b6af94a50657896c", + "shasum": "" + }, + "require": { + "aws/aws-sdk-php": "^3.0.0", + "league/flysystem": "~1.0", + "php": ">=5.5.0" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "~1.0.1", + "phpspec/phpspec": "^2.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\AwsS3v3\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Flysystem adapter for the AWS S3 SDK v3.x", + "time": "2016-06-21 21:34:35" }, { "name": "league/fractal", @@ -1446,7 +1574,7 @@ "league", "rest" ], - "time": "2015-03-19T15:16:43+00:00" + "time": "2015-03-19 15:16:43" }, { "name": "league/oauth2-server", @@ -1522,7 +1650,7 @@ "secure", "server" ], - "time": "2016-10-12T14:08:15+00:00" + "time": "2016-10-12 14:08:15" }, { "name": "monolog/monolog", @@ -1600,7 +1728,7 @@ "logging", "psr-3" ], - "time": "2017-03-13T07:08:03+00:00" + "time": "2017-03-13 07:08:03" }, { "name": "mtdowling/cron-expression", @@ -1644,7 +1772,62 @@ "cron", "schedule" ], - "time": "2017-01-23T04:29:33+00:00" + "time": "2017-01-23 04:29:33" + }, + { + "name": "mtdowling/jmespath.php", + "version": "2.4.0", + "source": { + "type": "git", + "url": "https://github.com/jmespath/jmespath.php.git", + "reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/adcc9531682cf87dfda21e1fd5d0e7a41d292fac", + "reference": "adcc9531682cf87dfda21e1fd5d0e7a41d292fac", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "bin/jp.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "JmesPath\\": "src/" + }, + "files": [ + "src/JmesPath.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": [ + "json", + "jsonpath" + ], + "time": "2016-12-03 22:08:25" }, { "name": "nesbot/carbon", @@ -1697,7 +1880,7 @@ "datetime", "time" ], - "time": "2017-01-16T07:55:07+00:00" + "time": "2017-01-16 07:55:07" }, { "name": "nikic/php-parser", @@ -1748,7 +1931,7 @@ "parser", "php" ], - "time": "2017-03-05T18:23:57+00:00" + "time": "2017-03-05 18:23:57" }, { "name": "paragonie/random_compat", @@ -1796,7 +1979,7 @@ "pseudorandom", "random" ], - "time": "2017-03-13T16:27:32+00:00" + "time": "2017-03-13 16:27:32" }, { "name": "phpseclib/phpseclib", @@ -1888,7 +2071,7 @@ "x.509", "x509" ], - "time": "2016-10-04T00:57:04+00:00" + "time": "2016-10-04 00:57:04" }, { "name": "predis/predis", @@ -1938,7 +2121,7 @@ "predis", "redis" ], - "time": "2016-06-16T16:22:20+00:00" + "time": "2016-06-16 16:22:20" }, { "name": "psr/http-message", @@ -1988,7 +2171,7 @@ "request", "response" ], - "time": "2016-08-06T14:39:51+00:00" + "time": "2016-08-06 14:39:51" }, { "name": "psr/log", @@ -2035,7 +2218,7 @@ "psr", "psr-3" ], - "time": "2016-10-10T12:19:37+00:00" + "time": "2016-10-10 12:19:37" }, { "name": "psy/psysh", @@ -2108,25 +2291,25 @@ "interactive", "shell" ], - "time": "2017-03-01T00:13:29+00:00" + "time": "2017-03-01 00:13:29" }, { "name": "ramsey/uuid", - "version": "3.5.2", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "5677cfe02397dd6b58c861870dfaa5d9007d3954" + "reference": "0b7bdfb180e72c8d76e75a649ced67e392201458" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/5677cfe02397dd6b58c861870dfaa5d9007d3954", - "reference": "5677cfe02397dd6b58c861870dfaa5d9007d3954", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/0b7bdfb180e72c8d76e75a649ced67e392201458", + "reference": "0b7bdfb180e72c8d76e75a649ced67e392201458", "shasum": "" }, "require": { "paragonie/random_compat": "^1.0|^2.0", - "php": ">=5.4" + "php": "^5.4 || ^7.0" }, "replace": { "rhumsaa/uuid": "self.version" @@ -2190,7 +2373,7 @@ "identifier", "uuid" ], - "time": "2016-11-22T19:21:44+00:00" + "time": "2017-03-18 15:38:09" }, { "name": "robclancy/presenter", @@ -2241,7 +2424,7 @@ "laravel", "presenter" ], - "time": "2015-03-14T08:14:37+00:00" + "time": "2015-03-14 08:14:37" }, { "name": "swiftmailer/swiftmailer", @@ -2295,7 +2478,7 @@ "mail", "mailer" ], - "time": "2017-02-13T07:52:53+00:00" + "time": "2017-02-13 07:52:53" }, { "name": "symfony/console", @@ -2356,7 +2539,7 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-01-08T20:43:43+00:00" + "time": "2017-01-08 20:43:43" }, { "name": "symfony/debug", @@ -2413,7 +2596,7 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-01-28T00:04:57+00:00" + "time": "2017-01-28 00:04:57" }, { "name": "symfony/event-dispatcher", @@ -2473,7 +2656,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2017-02-21T09:12:04+00:00" + "time": "2017-02-21 09:12:04" }, { "name": "symfony/finder", @@ -2522,7 +2705,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-01-02T20:31:54+00:00" + "time": "2017-01-02 20:31:54" }, { "name": "symfony/http-foundation", @@ -2575,7 +2758,7 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2017-01-08T20:43:43+00:00" + "time": "2017-01-08 20:43:43" }, { "name": "symfony/http-kernel", @@ -2657,7 +2840,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2017-01-28T02:53:17+00:00" + "time": "2017-01-28 02:53:17" }, { "name": "symfony/polyfill-mbstring", @@ -2716,7 +2899,7 @@ "portable", "shim" ], - "time": "2016-11-14T01:06:16+00:00" + "time": "2016-11-14 01:06:16" }, { "name": "symfony/polyfill-php56", @@ -2772,7 +2955,7 @@ "portable", "shim" ], - "time": "2016-11-14T01:06:16+00:00" + "time": "2016-11-14 01:06:16" }, { "name": "symfony/polyfill-util", @@ -2824,7 +3007,7 @@ "polyfill", "shim" ], - "time": "2016-11-14T01:06:16+00:00" + "time": "2016-11-14 01:06:16" }, { "name": "symfony/process", @@ -2873,7 +3056,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2017-01-21T17:13:55+00:00" + "time": "2017-01-21 17:13:55" }, { "name": "symfony/psr-http-message-bridge", @@ -2933,7 +3116,7 @@ "http-message", "psr-7" ], - "time": "2016-09-14T18:37:20+00:00" + "time": "2016-09-14 18:37:20" }, { "name": "symfony/routing", @@ -3008,7 +3191,7 @@ "uri", "url" ], - "time": "2017-01-28T00:04:57+00:00" + "time": "2017-01-28 00:04:57" }, { "name": "symfony/translation", @@ -3072,7 +3255,7 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2017-01-21T17:01:39+00:00" + "time": "2017-01-21 17:01:39" }, { "name": "symfony/var-dumper", @@ -3135,7 +3318,7 @@ "debug", "dump" ], - "time": "2017-01-24T13:02:38+00:00" + "time": "2017-01-24 13:02:38" }, { "name": "vlucas/phpdotenv", @@ -3185,7 +3368,7 @@ "env", "environment" ], - "time": "2016-09-01T10:05:43+00:00" + "time": "2016-09-01 10:05:43" }, { "name": "weotch/phpthumb", @@ -3220,7 +3403,7 @@ } ], "description": "Fork of PHPThumb that adds auto-image rotation based on EXIF data and composer support", - "time": "2015-05-12T22:56:19+00:00" + "time": "2015-05-12 22:56:19" }, { "name": "zendframework/zend-diactoros", @@ -3270,7 +3453,7 @@ "psr", "psr-7" ], - "time": "2017-01-23T04:53:24+00:00" + "time": "2017-01-23 04:53:24" } ], "packages-dev": [ @@ -3326,7 +3509,7 @@ "profiler", "webprofiler" ], - "time": "2017-01-19T08:19:49+00:00" + "time": "2017-01-19 08:19:49" }, { "name": "barryvdh/laravel-ide-helper", @@ -3392,7 +3575,7 @@ "phpstorm", "sublime" ], - "time": "2017-01-05T21:20:42+00:00" + "time": "2017-01-05 21:20:42" }, { "name": "barryvdh/reflection-docblock", @@ -3441,7 +3624,7 @@ "email": "mike.vanriel@naenius.com" } ], - "time": "2016-06-13T19:28:20+00:00" + "time": "2016-06-13 19:28:20" }, { "name": "behat/gherkin", @@ -3500,7 +3683,7 @@ "gherkin", "parser" ], - "time": "2016-10-30T11:50:56+00:00" + "time": "2016-10-30 11:50:56" }, { "name": "codeception/codeception", @@ -3592,7 +3775,7 @@ "functional testing", "unit testing" ], - "time": "2017-02-04T02:04:21+00:00" + "time": "2017-02-04 02:04:21" }, { "name": "doctrine/instantiator", @@ -3646,7 +3829,7 @@ "constructor", "instantiate" ], - "time": "2015-06-14T21:17:01+00:00" + "time": "2015-06-14 21:17:01" }, { "name": "facebook/webdriver", @@ -3695,7 +3878,7 @@ "selenium", "webdriver" ], - "time": "2017-01-13T15:48:08+00:00" + "time": "2017-01-13 15:48:08" }, { "name": "fzaninotto/faker", @@ -3743,20 +3926,20 @@ "faker", "fixtures" ], - "time": "2016-04-29T12:21:54+00:00" + "time": "2016-04-29 12:21:54" }, { "name": "gzero/testing", - "version": "v3.0.2", + "version": "v3.0.3", "source": { "type": "git", "url": "https://github.com/GrupaZero/testing.git", - "reference": "2ddab9c8132369e35b058fb5ce1d588734d7900a" + "reference": "06607442ecb7343f76aa8a3c340d823c10776dbd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrupaZero/testing/zipball/2ddab9c8132369e35b058fb5ce1d588734d7900a", - "reference": "2ddab9c8132369e35b058fb5ce1d588734d7900a", + "url": "https://api.github.com/repos/GrupaZero/testing/zipball/06607442ecb7343f76aa8a3c340d823c10776dbd", + "reference": "06607442ecb7343f76aa8a3c340d823c10776dbd", "shasum": "" }, "type": "library", @@ -3771,7 +3954,7 @@ } ], "description": "Package that helps testing across our packages", - "time": "2017-02-03T17:10:50+00:00" + "time": "2017-03-19 10:09:26" }, { "name": "hamcrest/hamcrest-php", @@ -3816,7 +3999,7 @@ "keywords": [ "test" ], - "time": "2015-05-11T14:41:42+00:00" + "time": "2015-05-11 14:41:42" }, { "name": "maximebf/debugbar", @@ -3877,7 +4060,7 @@ "debug", "debugbar" ], - "time": "2017-01-05T08:46:19+00:00" + "time": "2017-01-05 08:46:19" }, { "name": "mockery/mockery", @@ -3942,7 +4125,7 @@ "test double", "testing" ], - "time": "2017-02-28T12:52:32+00:00" + "time": "2017-02-28 12:52:32" }, { "name": "myclabs/deep-copy", @@ -3984,7 +4167,7 @@ "object", "object graph" ], - "time": "2017-01-26T22:05:40+00:00" + "time": "2017-01-26 22:05:40" }, { "name": "phpdocumentor/reflection-common", @@ -4038,7 +4221,7 @@ "reflection", "static analysis" ], - "time": "2015-12-27T11:43:31+00:00" + "time": "2015-12-27 11:43:31" }, { "name": "phpdocumentor/reflection-docblock", @@ -4083,7 +4266,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30T07:12:33+00:00" + "time": "2016-09-30 07:12:33" }, { "name": "phpdocumentor/type-resolver", @@ -4130,7 +4313,7 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-11-25T06:54:22+00:00" + "time": "2016-11-25 06:54:22" }, { "name": "phpspec/prophecy", @@ -4193,7 +4376,7 @@ "spy", "stub" ], - "time": "2017-03-02T20:05:34+00:00" + "time": "2017-03-02 20:05:34" }, { "name": "phpunit/php-code-coverage", @@ -4256,7 +4439,7 @@ "testing", "xunit" ], - "time": "2017-03-01T09:12:17+00:00" + "time": "2017-03-01 09:12:17" }, { "name": "phpunit/php-file-iterator", @@ -4303,7 +4486,7 @@ "filesystem", "iterator" ], - "time": "2016-10-03T07:40:28+00:00" + "time": "2016-10-03 07:40:28" }, { "name": "phpunit/php-text-template", @@ -4344,7 +4527,7 @@ "keywords": [ "template" ], - "time": "2015-06-21T13:50:34+00:00" + "time": "2015-06-21 13:50:34" }, { "name": "phpunit/php-timer", @@ -4393,7 +4576,7 @@ "keywords": [ "timer" ], - "time": "2017-02-26T11:10:40+00:00" + "time": "2017-02-26 11:10:40" }, { "name": "phpunit/php-token-stream", @@ -4442,20 +4625,20 @@ "keywords": [ "tokenizer" ], - "time": "2017-02-27T10:12:30+00:00" + "time": "2017-02-27 10:12:30" }, { "name": "phpunit/phpunit", - "version": "5.7.16", + "version": "5.7.17", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "dafc78e2a7d12139b0e97078d1082326bd09363d" + "reference": "68752b665d3875f9a38a357e3ecb35c79f8673bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/dafc78e2a7d12139b0e97078d1082326bd09363d", - "reference": "dafc78e2a7d12139b0e97078d1082326bd09363d", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/68752b665d3875f9a38a357e3ecb35c79f8673bf", + "reference": "68752b665d3875f9a38a357e3ecb35c79f8673bf", "shasum": "" }, "require": { @@ -4524,7 +4707,7 @@ "testing", "xunit" ], - "time": "2017-03-15T13:02:34+00:00" + "time": "2017-03-19 16:52:12" }, { "name": "phpunit/phpunit-mock-objects", @@ -4583,7 +4766,7 @@ "mock", "xunit" ], - "time": "2016-12-08T20:27:08+00:00" + "time": "2016-12-08 20:27:08" }, { "name": "satooshi/php-coveralls", @@ -4646,7 +4829,7 @@ "github", "test" ], - "time": "2017-02-25T12:14:18+00:00" + "time": "2017-02-25 12:14:18" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -4691,7 +4874,7 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "time": "2017-03-04 06:30:41" }, { "name": "sebastian/comparator", @@ -4755,7 +4938,7 @@ "compare", "equality" ], - "time": "2017-01-29T09:50:25+00:00" + "time": "2017-01-29 09:50:25" }, { "name": "sebastian/diff", @@ -4807,7 +4990,7 @@ "keywords": [ "diff" ], - "time": "2015-12-08T07:14:41+00:00" + "time": "2015-12-08 07:14:41" }, { "name": "sebastian/environment", @@ -4857,7 +5040,7 @@ "environment", "hhvm" ], - "time": "2016-11-26T07:53:53+00:00" + "time": "2016-11-26 07:53:53" }, { "name": "sebastian/exporter", @@ -4924,7 +5107,7 @@ "export", "exporter" ], - "time": "2016-11-19T08:54:04+00:00" + "time": "2016-11-19 08:54:04" }, { "name": "sebastian/global-state", @@ -4975,7 +5158,7 @@ "keywords": [ "global state" ], - "time": "2015-10-12T03:26:01+00:00" + "time": "2015-10-12 03:26:01" }, { "name": "sebastian/object-enumerator", @@ -5021,7 +5204,7 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-02-18T15:18:39+00:00" + "time": "2017-02-18 15:18:39" }, { "name": "sebastian/recursion-context", @@ -5074,7 +5257,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-11-19T07:33:16+00:00" + "time": "2016-11-19 07:33:16" }, { "name": "sebastian/resource-operations", @@ -5116,7 +5299,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28T20:34:47+00:00" + "time": "2015-07-28 20:34:47" }, { "name": "sebastian/version", @@ -5159,7 +5342,7 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2016-10-03T07:35:21+00:00" + "time": "2016-10-03 07:35:21" }, { "name": "symfony/browser-kit", @@ -5216,7 +5399,7 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2017-02-21T09:12:04+00:00" + "time": "2017-02-21 09:12:04" }, { "name": "symfony/class-loader", @@ -5272,7 +5455,7 @@ ], "description": "Symfony ClassLoader Component", "homepage": "https://symfony.com", - "time": "2017-02-18T17:28:00+00:00" + "time": "2017-02-18 17:28:00" }, { "name": "symfony/config", @@ -5328,7 +5511,7 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2017-03-01T18:18:25+00:00" + "time": "2017-03-01 18:18:25" }, { "name": "symfony/css-selector", @@ -5381,7 +5564,7 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2017-01-02T20:31:54+00:00" + "time": "2017-01-02 20:31:54" }, { "name": "symfony/dom-crawler", @@ -5437,7 +5620,7 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2017-01-21T17:13:55+00:00" + "time": "2017-01-21 17:13:55" }, { "name": "symfony/filesystem", @@ -5486,7 +5669,7 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2017-03-06T19:30:27+00:00" + "time": "2017-03-06 19:30:27" }, { "name": "symfony/stopwatch", @@ -5535,7 +5718,7 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2017-02-18T17:28:00+00:00" + "time": "2017-02-18 17:28:00" }, { "name": "symfony/yaml", @@ -5590,7 +5773,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-03-07T16:47:02+00:00" + "time": "2017-03-07 16:47:02" }, { "name": "webmozart/assert", @@ -5640,7 +5823,7 @@ "check", "validate" ], - "time": "2016-11-23T20:04:58+00:00" + "time": "2016-11-23 20:04:58" } ], "aliases": [], diff --git a/config/filesystems.php b/config/filesystems.php index 30dcecdb..e22d7383 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -75,6 +75,10 @@ 'region' => env('S3_REGION', 'your-region'), 'bucket' => env('S3_BUCKET', 'your-bucket'), ], + + 'test' => [ + 'driver' => 'nullAdapter', + ], ], ]; diff --git a/tests/_support/FunctionalTester.php b/tests/_support/FunctionalTester.php index 836d6720..c164386e 100644 --- a/tests/_support/FunctionalTester.php +++ b/tests/_support/FunctionalTester.php @@ -61,16 +61,10 @@ public function __construct(\Codeception\Scenario $scenario) $this->faker = Factory::create(); $this->contentRepo = new ContentRepository( new Content(), - new Dispatcher(), - new FileRepository( - new File(), new FileType(), new Dispatcher() - ) + new Dispatcher() ); $this->blockRepo = new BlockRepository( - new Block(), new Dispatcher(), - new FileRepository( - new File(), new FileType(), new Dispatcher() - ) + new Block(), new Dispatcher() ); $this->userRepo = new UserRepository(new User(), new Dispatcher()); parent::__construct($scenario); diff --git a/tests/_support/_generated/FunctionalTesterActions.php b/tests/_support/_generated/FunctionalTesterActions.php index 0606a3e3..85d94cdd 100644 --- a/tests/_support/_generated/FunctionalTesterActions.php +++ b/tests/_support/_generated/FunctionalTesterActions.php @@ -1,4 +1,4 @@ -seeBinaryResponseEquals("8c90748342f19b195b9c6b4eff742ded"); + * ?> + * ``` + * + * Example: Using md5 for a file contents + * + * ```php + * seeBinaryResponseEquals(md5($fileData)); + * ?> + * ``` + * Example: Using sha256 hsah + * + * ```php + * seeBinaryResponseEquals(hash("sha256", base64_decode($fileData)), 'sha256'); + * ?> + * ``` + * + * @param $hash the hashed data response expected + * @param $algo the hash algorithm to use. Default md5. + * @part json + * @part xml + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\REST::seeBinaryResponseEquals() + */ + public function canSeeBinaryResponseEquals($hash, $algo = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeBinaryResponseEquals', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if the hash of a binary response is exactly the same as provided. + * Parameter can be passed as any hash string supported by hash(), with an + * optional second parameter to specify the hash type, which defaults to md5. + * + * Example: Using md5 hash key + * + * ```php + * seeBinaryResponseEquals("8c90748342f19b195b9c6b4eff742ded"); + * ?> + * ``` + * + * Example: Using md5 for a file contents + * + * ```php + * seeBinaryResponseEquals(md5($fileData)); + * ?> + * ``` + * Example: Using sha256 hsah + * + * ```php + * seeBinaryResponseEquals(hash("sha256", base64_decode($fileData)), 'sha256'); + * ?> + * ``` + * + * @param $hash the hashed data response expected + * @param $algo the hash algorithm to use. Default md5. + * @part json + * @part xml + * @see \Codeception\Module\REST::seeBinaryResponseEquals() + */ + public function seeBinaryResponseEquals($hash, $algo = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeBinaryResponseEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if the hash of a binary response is not the same as provided. + * + * ```php + * dontSeeBinaryResponseEquals("8c90748342f19b195b9c6b4eff742ded"); + * ?> + * ``` + * Opposite to `seeBinaryResponseEquals` + * + * @param $hash the hashed data response expected + * @param $algo the hash algorithm to use. Default md5. + * @part json + * @part xml + * Conditional Assertion: Test won't be stopped on fail + * @see \Codeception\Module\REST::dontSeeBinaryResponseEquals() + */ + public function cantSeeBinaryResponseEquals($hash, $algo = null) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeBinaryResponseEquals', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks if the hash of a binary response is not the same as provided. + * + * ```php + * dontSeeBinaryResponseEquals("8c90748342f19b195b9c6b4eff742ded"); + * ?> + * ``` + * Opposite to `seeBinaryResponseEquals` + * + * @param $hash the hashed data response expected + * @param $algo the hash algorithm to use. Default md5. + * @part json + * @part xml + * @see \Codeception\Module\REST::dontSeeBinaryResponseEquals() + */ + public function dontSeeBinaryResponseEquals($hash, $algo = null) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeBinaryResponseEquals', func_get_args())); + } + + /** * [!] Method is generated. Documentation taken from corresponding module. * diff --git a/tests/_support/_generated/UnitTesterActions.php b/tests/_support/_generated/UnitTesterActions.php index 5170a3d8..93b571e0 100644 --- a/tests/_support/_generated/UnitTesterActions.php +++ b/tests/_support/_generated/UnitTesterActions.php @@ -1,4 +1,4 @@ -