From db0d2b92a58d4d1e7a7e5a62df86673656dbaeb8 Mon Sep 17 00:00:00 2001 From: Olivier Paroz Date: Sat, 11 Jun 2016 02:09:42 +0200 Subject: [PATCH] Update test setup to use Share 2.0 #663 --- .travis.yml | 2 +- composer.json | 6 +- composer.lock | 441 ++++++++++-------- tests/_support/Helper/DataSetup.php | 26 +- tests/_support/Page/Acceptance/Login.php | 2 +- tests/unit/controller/FilesControllerTest.php | 11 +- tests/unit/service/SearchMediaServiceTest.php | 35 +- vendor/composer/LICENSE | 21 + vendor/composer/autoload_real.php | 29 +- vendor/composer/autoload_static.php | 45 ++ vendor/composer/installed.json | 12 +- vendor/symfony/yaml/Dumper.php | 6 +- vendor/symfony/yaml/Inline.php | 30 +- vendor/symfony/yaml/Parser.php | 36 +- vendor/symfony/yaml/README.md | 20 +- vendor/symfony/yaml/Tests/DumperTest.php | 18 + vendor/symfony/yaml/Tests/InlineTest.php | 20 + vendor/symfony/yaml/Tests/ParserTest.php | 41 +- vendor/symfony/yaml/Tests/YamlTest.php | 18 + vendor/symfony/yaml/Yaml.php | 4 + 20 files changed, 561 insertions(+), 262 deletions(-) create mode 100644 vendor/composer/LICENSE create mode 100644 vendor/composer/autoload_static.php diff --git a/.travis.yml b/.travis.yml index 77aff6e5..f59f563c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -98,7 +98,7 @@ before_script: script: # Test lint - - php vendor/bin/parallel-lint --exclude travis --exclude vendor . vendor/composer vendor/symfony/yaml vendor/autoload.php + - php vendor/bin/parallel-lint --exclude vendor/composer/autoload_static.php --exclude travis --exclude vendor . vendor/composer vendor/symfony/yaml vendor/autoload.php # Acceptance tests, using Firefox, without code coverage - php vendor/bin/codecept run acceptance --env firefox diff --git a/composer.json b/composer.json index d2794ed9..a2c1b30d 100644 --- a/composer.json +++ b/composer.json @@ -27,9 +27,9 @@ "symfony/yaml": "~2.6" }, "require-dev": { - "guzzlehttp/guzzle": "^5.0|^6.0", - "phpunit/phpunit": "^4.0|^5.1", - "codeception/codeception": "2.1.*", + "guzzlehttp/guzzle": "^5.0|^6.2", + "phpunit/phpunit": "^4.0|^5.4", + "codeception/codeception": "2.2.*", "codeception/phpbuiltinserver": "*", "composer-plugin-api": "^1.0", "codeception/c3": "2.*", diff --git a/composer.lock b/composer.lock index 82eae682..94c7d816 100644 --- a/composer.lock +++ b/composer.lock @@ -4,21 +4,21 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "450c86a643c00b1f5d324e4780087167", - "content-hash": "18167ce1fdff23a198e8b1a6f570f84f", + "hash": "278e998730de5bee1c368c85a8136db9", + "content-hash": "7706e2f2b211e3d825377aeff5e94ad5", "packages": [ { "name": "symfony/yaml", - "version": "v2.8.3", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "2a4ee40acb880c56f29fb1b8886e7ffe94f3b995" + "reference": "815fabf3f48c7d1df345a69d1ad1a88f59757b34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/2a4ee40acb880c56f29fb1b8886e7ffe94f3b995", - "reference": "2a4ee40acb880c56f29fb1b8886e7ffe94f3b995", + "url": "https://api.github.com/repos/symfony/yaml/zipball/815fabf3f48c7d1df345a69d1ad1a88f59757b34", + "reference": "815fabf3f48c7d1df345a69d1ad1a88f59757b34", "shasum": "" }, "require": { @@ -54,10 +54,68 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-02-23 07:41:20" + "time": "2016-06-06 11:11:27" } ], "packages-dev": [ + { + "name": "behat/gherkin", + "version": "v4.4.1", + "source": { + "type": "git", + "url": "https://github.com/Behat/Gherkin.git", + "reference": "1576b485c0f92ef6d27da9c4bbfc57ee30cf6911" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Behat/Gherkin/zipball/1576b485c0f92ef6d27da9c4bbfc57ee30cf6911", + "reference": "1576b485c0f92ef6d27da9c4bbfc57ee30cf6911", + "shasum": "" + }, + "require": { + "php": ">=5.3.1" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "symfony/yaml": "~2.1" + }, + "suggest": { + "symfony/yaml": "If you want to parse features, represented in YAML files" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.4-dev" + } + }, + "autoload": { + "psr-0": { + "Behat\\Gherkin": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + } + ], + "description": "Gherkin DSL parser for PHP 5.3", + "homepage": "http://behat.org/", + "keywords": [ + "BDD", + "Behat", + "Cucumber", + "DSL", + "gherkin", + "parser" + ], + "time": "2015-12-30 14:47:00" + }, { "name": "cilex/cilex", "version": "1.1.0", @@ -228,19 +286,20 @@ }, { "name": "codeception/codeception", - "version": "2.1.7", + "version": "2.2.1", "source": { "type": "git", "url": "https://github.com/Codeception/Codeception.git", - "reference": "65971b0dee4972710365b6102154cd412a9bf7b1" + "reference": "f137636f0c185e7d4a495b9cea70c1afae27dfc7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/65971b0dee4972710365b6102154cd412a9bf7b1", - "reference": "65971b0dee4972710365b6102154cd412a9bf7b1", + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/f137636f0c185e7d4a495b9cea70c1afae27dfc7", + "reference": "f137636f0c185e7d4a495b9cea70c1afae27dfc7", "shasum": "" }, "require": { + "behat/gherkin": "~4.4.0", "ext-json": "*", "ext-mbstring": "*", "facebook/webdriver": ">=1.0.1 <2.0", @@ -248,29 +307,36 @@ "guzzlehttp/psr7": "~1.0", "php": ">=5.4.0 <8.0", "phpunit/php-code-coverage": ">=2.1.3", - "phpunit/phpunit": ">4.8.20 <6.0", - "symfony/browser-kit": ">=2.5 <3.1", - "symfony/console": ">=2.5 <3.1", - "symfony/css-selector": ">=2.5 <3.1", - "symfony/dom-crawler": ">=2.5 <3.1", - "symfony/event-dispatcher": ">=2.5 <3.1", - "symfony/finder": ">=2.5 <3.1", - "symfony/yaml": ">=2.5 <3.1" + "phpunit/phpunit": ">4.8.20 <5.5", + "symfony/browser-kit": ">=2.7 <4.0", + "symfony/console": ">=2.7 <4.0", + "symfony/css-selector": ">=2.7 <4.0", + "symfony/dom-crawler": ">=2.7 <4.0", + "symfony/event-dispatcher": ">=2.7 <4.0", + "symfony/finder": ">=2.7 <4.0", + "symfony/yaml": ">=2.7 <4.0" }, "require-dev": { "codeception/specify": "~0.3", "facebook/php-sdk-v4": "~5.0", "flow/jsonpath": "~0.2", + "league/factory-muffin": "^3.0", + "league/factory-muffin-faker": "^1.0", + "mongodb/mongodb": "^1.0", "monolog/monolog": "~1.8", - "pda/pheanstalk": "~2.0", - "php-amqplib/php-amqplib": "~2.4" + "pda/pheanstalk": "~3.0", + "php-amqplib/php-amqplib": "~2.4", + "predis/predis": "^1.0", + "squizlabs/php_codesniffer": "~2.0" }, "suggest": { - "codeception/phpbuiltinserver": "Extension to start and stop PHP built-in web server for your tests", "codeception/specify": "BDD-style code blocks", "codeception/verify": "BDD-style assertions", - "monolog/monolog": "Log test steps", - "phpseclib/phpseclib": "Extension required to use the SFTP option in the FTP Module." + "flow/jsonpath": "For using JSONPath in REST module", + "league/factory-muffin": "For DataFactory module", + "league/factory-muffin-faker": "For Faker support in DataFactory module", + "phpseclib/phpseclib": "for SFTP option in FTP Module", + "symfony/phpunit-bridge": "For phpunit-bridge support" }, "bin": [ "codecept" @@ -305,7 +371,7 @@ "functional testing", "unit testing" ], - "time": "2016-03-12 01:15:25" + "time": "2016-06-03 12:44:06" }, { "name": "codeception/phpbuiltinserver", @@ -703,16 +769,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.2.3", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "2e89629ff057ebb49492ba08e6995d3a6a80021b" + "reference": "31382fef2889136415751badebbd1cb022a4ed72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/2e89629ff057ebb49492ba08e6995d3a6a80021b", - "reference": "2e89629ff057ebb49492ba08e6995d3a6a80021b", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/31382fef2889136415751badebbd1cb022a4ed72", + "reference": "31382fef2889136415751badebbd1cb022a4ed72", "shasum": "" }, "require": { @@ -757,7 +823,7 @@ "stream", "uri" ], - "time": "2016-02-18 21:54:00" + "time": "2016-04-13 19:56:01" }, { "name": "guzzlehttp/ringphp", @@ -1200,36 +1266,41 @@ }, { "name": "jms/serializer", - "version": "0.16.0", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/serializer.git", - "reference": "c8a171357ca92b6706e395c757f334902d430ea9" + "reference": "fe13a1f993ea3456e195b7820692f2eb2b6bbb48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/c8a171357ca92b6706e395c757f334902d430ea9", - "reference": "c8a171357ca92b6706e395c757f334902d430ea9", + "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/fe13a1f993ea3456e195b7820692f2eb2b6bbb48", + "reference": "fe13a1f993ea3456e195b7820692f2eb2b6bbb48", "shasum": "" }, "require": { "doctrine/annotations": "1.*", + "doctrine/instantiator": "~1.0.3", "jms/metadata": "~1.1", "jms/parser-lib": "1.*", - "php": ">=5.3.2", + "php": ">=5.4.0", "phpcollection/phpcollection": "~0.1" }, + "conflict": { + "twig/twig": "<1.12" + }, "require-dev": { "doctrine/orm": "~2.1", "doctrine/phpcr-odm": "~1.0.1", "jackalope/jackalope-doctrine-dbal": "1.0.*", + "phpunit/phpunit": "~4.0", "propel/propel1": "~1.7", "symfony/filesystem": "2.*", "symfony/form": "~2.1", "symfony/translation": "~2.0", "symfony/validator": "~2.0", "symfony/yaml": "2.*", - "twig/twig": ">=1.8,<2.0-dev" + "twig/twig": "~1.12|~2.0" }, "suggest": { "symfony/yaml": "Required if you'd like to serialize data to YAML format." @@ -1237,7 +1308,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "0.15-dev" + "dev-master": "1.1-dev" } }, "autoload": { @@ -1251,10 +1322,8 @@ ], "authors": [ { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" } ], "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", @@ -1266,7 +1335,7 @@ "serialization", "xml" ], - "time": "2014-03-18 08:39:00" + "time": "2015-10-27 09:24:41" }, { "name": "justinrainbow/json-schema", @@ -1378,16 +1447,16 @@ }, { "name": "monolog/monolog", - "version": "1.18.1", + "version": "1.19.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "a5f2734e8c16f3aa21b3da09715d10e15b4d2d45" + "reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/a5f2734e8c16f3aa21b3da09715d10e15b4d2d45", - "reference": "a5f2734e8c16f3aa21b3da09715d10e15b4d2d45", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5f56ed5212dc509c8dc8caeba2715732abb32dbf", + "reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf", "shasum": "" }, "require": { @@ -1402,13 +1471,13 @@ "doctrine/couchdb": "~1.0@dev", "graylog2/gelf-php": "~1.0", "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", "phpunit/phpunit": "~4.5", "phpunit/phpunit-mock-objects": "2.3.0", "raven/raven": "^0.13", "ruflin/elastica": ">=0.90 <3.0", - "swiftmailer/swiftmailer": "~5.3", - "videlalvaro/php-amqplib": "~2.4" + "swiftmailer/swiftmailer": "~5.3" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", @@ -1417,11 +1486,11 @@ "ext-mongo": "Allow sending log messages to a MongoDB server", "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", "php-console/php-console": "Allow sending log messages to Google Chrome", "raven/raven": "Allow sending log messages to a Sentry server", "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "videlalvaro/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib" + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, "type": "library", "extra": { @@ -1452,36 +1521,36 @@ "logging", "psr-3" ], - "time": "2016-03-13 16:08:35" + "time": "2016-04-12 18:29:35" }, { "name": "nikic/php-parser", - "version": "v0.9.5", + "version": "v1.4.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "ef70767475434bdb3615b43c327e2cae17ef12eb" + "reference": "f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ef70767475434bdb3615b43c327e2cae17ef12eb", - "reference": "ef70767475434bdb3615b43c327e2cae17ef12eb", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51", + "reference": "f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.2" + "php": ">=5.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.9-dev" + "dev-master": "1.4-dev" } }, "autoload": { - "psr-0": { - "PHPParser": "lib/" - } + "files": [ + "lib/bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1497,7 +1566,7 @@ "parser", "php" ], - "time": "2014-07-23 18:24:17" + "time": "2015-09-19 14:15:08" }, { "name": "phpcollection/phpcollection", @@ -1594,23 +1663,23 @@ }, { "name": "phpdocumentor/graphviz", - "version": "1.0.3", + "version": "1.0.4", "source": { "type": "git", "url": "https://github.com/phpDocumentor/GraphViz.git", - "reference": "aa243118c8a055fc853c02802e8503c5435862f7" + "reference": "a906a90a9f230535f25ea31caf81b2323956283f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/GraphViz/zipball/aa243118c8a055fc853c02802e8503c5435862f7", - "reference": "aa243118c8a055fc853c02802e8503c5435862f7", + "url": "https://api.github.com/repos/phpDocumentor/GraphViz/zipball/a906a90a9f230535f25ea31caf81b2323956283f", + "reference": "a906a90a9f230535f25ea31caf81b2323956283f", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~3.7" + "phpunit/phpunit": "~4.0" }, "type": "library", "autoload": { @@ -1631,32 +1700,32 @@ "email": "mike.vanriel@naenius.com" } ], - "time": "2014-07-19 06:52:59" + "time": "2016-02-02 13:00:08" }, { "name": "phpdocumentor/phpdocumentor", - "version": "v2.8.5", + "version": "v2.9.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/phpDocumentor2.git", - "reference": "adfb4affa80e8cc0134616f2d2d264dd25c243eb" + "reference": "be607da0eef9b9249c43c5b4820d25d631c73667" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/phpDocumentor2/zipball/adfb4affa80e8cc0134616f2d2d264dd25c243eb", - "reference": "adfb4affa80e8cc0134616f2d2d264dd25c243eb", + "url": "https://api.github.com/repos/phpDocumentor/phpDocumentor2/zipball/be607da0eef9b9249c43c5b4820d25d631c73667", + "reference": "be607da0eef9b9249c43c5b4820d25d631c73667", "shasum": "" }, "require": { "cilex/cilex": "~1.0", "erusev/parsedown": "~1.0", "herrera-io/phar-update": "1.0.3", - "jms/serializer": "~0.12", + "jms/serializer": ">=0.12", "monolog/monolog": "~1.6", "php": ">=5.3.3", "phpdocumentor/fileset": "~1.0", "phpdocumentor/graphviz": "~1.0", - "phpdocumentor/reflection": "~1.0", + "phpdocumentor/reflection": "^3.0", "phpdocumentor/reflection-docblock": "~2.0", "symfony/config": "~2.3", "symfony/console": "~2.3", @@ -1720,24 +1789,24 @@ "documentation", "phpdoc" ], - "time": "2015-07-28 06:36:40" + "time": "2016-05-22 09:50:56" }, { "name": "phpdocumentor/reflection", - "version": "1.0.7", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/Reflection.git", - "reference": "fc40c3f604ac2287eb5c314174d5109b2c699372" + "reference": "793bfd92d9a0fc96ae9608fb3e947c3f59fb3a0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/Reflection/zipball/fc40c3f604ac2287eb5c314174d5109b2c699372", - "reference": "fc40c3f604ac2287eb5c314174d5109b2c699372", + "url": "https://api.github.com/repos/phpDocumentor/Reflection/zipball/793bfd92d9a0fc96ae9608fb3e947c3f59fb3a0d", + "reference": "793bfd92d9a0fc96ae9608fb3e947c3f59fb3a0d", "shasum": "" }, "require": { - "nikic/php-parser": "~0.9.4", + "nikic/php-parser": "^1.0", "php": ">=5.3.3", "phpdocumentor/reflection-docblock": "~2.0", "psr/log": "~1.0" @@ -1774,7 +1843,7 @@ "reflection", "static analysis" ], - "time": "2014-11-14 11:43:04" + "time": "2016-05-21 08:42:32" }, { "name": "phpdocumentor/reflection-docblock", @@ -1877,32 +1946,32 @@ }, { "name": "phpspec/prophecy", - "version": "v1.6.0", + "version": "v1.6.1", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972" + "reference": "58a8137754bc24b25740d4281399a4a3596058e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/3c91bdf81797d725b14cb62906f9a4ce44235972", - "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", + "reference": "58a8137754bc24b25740d4281399a4a3596058e0", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1", - "sebastian/recursion-context": "~1.0" + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1", + "sebastian/recursion-context": "^1.0" }, "require-dev": { - "phpspec/phpspec": "~2.0" + "phpspec/phpspec": "^2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5.x-dev" + "dev-master": "1.6.x-dev" } }, "autoload": { @@ -1935,7 +2004,7 @@ "spy", "stub" ], - "time": "2016-02-15 07:46:21" + "time": "2016-06-07 08:13:47" }, { "name": "phpunit/php-code-coverage", @@ -2089,21 +2158,24 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.7", + "version": "1.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "require-dev": { + "phpunit/phpunit": "~4|~5" + }, "type": "library", "autoload": { "classmap": [ @@ -2126,7 +2198,7 @@ "keywords": [ "timer" ], - "time": "2015-06-21 08:01:12" + "time": "2016-05-12 18:03:57" }, { "name": "phpunit/php-token-stream", @@ -2179,16 +2251,16 @@ }, { "name": "phpunit/phpunit", - "version": "4.8.24", + "version": "4.8.26", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a1066c562c52900a142a0e2bbf0582994671385e" + "reference": "fc1d8cd5b5de11625979125c5639347896ac2c74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1066c562c52900a142a0e2bbf0582994671385e", - "reference": "a1066c562c52900a142a0e2bbf0582994671385e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fc1d8cd5b5de11625979125c5639347896ac2c74", + "reference": "fc1d8cd5b5de11625979125c5639347896ac2c74", "shasum": "" }, "require": { @@ -2202,7 +2274,7 @@ "phpunit/php-code-coverage": "~2.1", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": ">=1.0.6", + "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "~2.3", "sebastian/comparator": "~1.1", "sebastian/diff": "~1.2", @@ -2247,7 +2319,7 @@ "testing", "xunit" ], - "time": "2016-03-14 06:16:08" + "time": "2016-05-17 03:09:28" }, { "name": "phpunit/phpunit-mock-objects", @@ -2440,16 +2512,16 @@ }, { "name": "react/promise", - "version": "v2.2.2", + "version": "v2.4.1", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "3aacad8bf10c7d83e6fa2089d413529888c2bedf" + "reference": "8025426794f1944de806618671d4fa476dc7626f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/3aacad8bf10c7d83e6fa2089d413529888c2bedf", - "reference": "3aacad8bf10c7d83e6fa2089d413529888c2bedf", + "url": "https://api.github.com/repos/reactphp/promise/zipball/8025426794f1944de806618671d4fa476dc7626f", + "reference": "8025426794f1944de806618671d4fa476dc7626f", "shasum": "" }, "require": { @@ -2480,7 +2552,7 @@ } ], "description": "A lightweight implementation of CommonJS Promises/A for PHP", - "time": "2016-02-26 19:09:02" + "time": "2016-05-03 17:50:52" }, { "name": "sebastian/comparator", @@ -2600,16 +2672,16 @@ }, { "name": "sebastian/environment", - "version": "1.3.5", + "version": "1.3.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf" + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf", - "reference": "dc7a29032cf72b54f36dac15a1ca5b3a1b6029bf", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/4e8f0da10ac5802913afc151413bc8c53b6c2716", + "reference": "4e8f0da10ac5802913afc151413bc8c53b6c2716", "shasum": "" }, "require": { @@ -2646,7 +2718,7 @@ "environment", "hhvm" ], - "time": "2016-02-26 18:40:46" + "time": "2016-05-17 03:18:57" }, { "name": "sebastian/exporter", @@ -2901,21 +2973,21 @@ }, { "name": "symfony/browser-kit", - "version": "v2.8.3", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "6b2085020b4e86fcb7ae44c3ab8ddb91774b33d2" + "reference": "2508ecbfc98b007bc1b670cef40ff821b827c61c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/6b2085020b4e86fcb7ae44c3ab8ddb91774b33d2", - "reference": "6b2085020b4e86fcb7ae44c3ab8ddb91774b33d2", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/2508ecbfc98b007bc1b670cef40ff821b827c61c", + "reference": "2508ecbfc98b007bc1b670cef40ff821b827c61c", "shasum": "" }, "require": { "php": ">=5.3.9", - "symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0" + "symfony/dom-crawler": "~2.1|~3.0.0" }, "require-dev": { "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0", @@ -2954,20 +3026,20 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2016-01-27 11:34:40" + "time": "2016-06-06 15:06:25" }, { "name": "symfony/config", - "version": "v2.8.3", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "0f8f94e6a32b5c480024eed5fa5cbd2790d0ad19" + "reference": "a2edd59c2163c65747fc3f35d132b5a39266bd05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/0f8f94e6a32b5c480024eed5fa5cbd2790d0ad19", - "reference": "0f8f94e6a32b5c480024eed5fa5cbd2790d0ad19", + "url": "https://api.github.com/repos/symfony/config/zipball/a2edd59c2163c65747fc3f35d132b5a39266bd05", + "reference": "a2edd59c2163c65747fc3f35d132b5a39266bd05", "shasum": "" }, "require": { @@ -3007,20 +3079,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2016-02-22 16:12:45" + "time": "2016-06-06 11:11:27" }, { "name": "symfony/console", - "version": "v2.8.3", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "56cc5caf051189720b8de974e4746090aaa10d44" + "reference": "5ac8bc9aa77bb2edf06af3a1bb6bc1020d23acd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/56cc5caf051189720b8de974e4746090aaa10d44", - "reference": "56cc5caf051189720b8de974e4746090aaa10d44", + "url": "https://api.github.com/repos/symfony/console/zipball/5ac8bc9aa77bb2edf06af3a1bb6bc1020d23acd3", + "reference": "5ac8bc9aa77bb2edf06af3a1bb6bc1020d23acd3", "shasum": "" }, "require": { @@ -3067,20 +3139,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2016-02-28 16:20:50" + "time": "2016-06-06 15:06:25" }, { "name": "symfony/css-selector", - "version": "v2.8.3", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "8d83ff9777cdbd83e7f90d9c48f4729823791a5e" + "reference": "9a0b2649328297fb6acd0c823789d92efcbd36ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/8d83ff9777cdbd83e7f90d9c48f4729823791a5e", - "reference": "8d83ff9777cdbd83e7f90d9c48f4729823791a5e", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/9a0b2649328297fb6acd0c823789d92efcbd36ad", + "reference": "9a0b2649328297fb6acd0c823789d92efcbd36ad", "shasum": "" }, "require": { @@ -3120,20 +3192,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2016-01-27 05:14:19" + "time": "2016-06-06 11:11:27" }, { "name": "symfony/dom-crawler", - "version": "v2.8.3", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "e1a4b4c83f5ee6f5902f1d53035e3718909a0c11" + "reference": "f282b08f6bbbc72e7af2e9e0c2f896221053f791" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/e1a4b4c83f5ee6f5902f1d53035e3718909a0c11", - "reference": "e1a4b4c83f5ee6f5902f1d53035e3718909a0c11", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/f282b08f6bbbc72e7af2e9e0c2f896221053f791", + "reference": "f282b08f6bbbc72e7af2e9e0c2f896221053f791", "shasum": "" }, "require": { @@ -3176,20 +3248,20 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2016-02-28 16:20:50" + "time": "2016-04-12 18:01:21" }, { "name": "symfony/event-dispatcher", - "version": "v2.8.3", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "78c468665c9568c3faaa9c416a7134308f2d85c3" + "reference": "2a6b8713f8bdb582058cfda463527f195b066110" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/78c468665c9568c3faaa9c416a7134308f2d85c3", - "reference": "78c468665c9568c3faaa9c416a7134308f2d85c3", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2a6b8713f8bdb582058cfda463527f195b066110", + "reference": "2a6b8713f8bdb582058cfda463527f195b066110", "shasum": "" }, "require": { @@ -3236,20 +3308,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2016-01-27 05:14:19" + "time": "2016-06-06 11:11:27" }, { "name": "symfony/filesystem", - "version": "v2.8.3", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "65cb36b6539b1d446527d60457248f30d045464d" + "reference": "dee379131dceed90a429e951546b33edfe7dccbb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/65cb36b6539b1d446527d60457248f30d045464d", - "reference": "65cb36b6539b1d446527d60457248f30d045464d", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/dee379131dceed90a429e951546b33edfe7dccbb", + "reference": "dee379131dceed90a429e951546b33edfe7dccbb", "shasum": "" }, "require": { @@ -3285,20 +3357,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2016-02-22 15:02:30" + "time": "2016-04-12 18:01:21" }, { "name": "symfony/finder", - "version": "v2.8.3", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "877bb4b16ea573cc8c024e9590888fcf7eb7e0f7" + "reference": "3ec095fab1800222732ca522a95dce8fa124007b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/877bb4b16ea573cc8c024e9590888fcf7eb7e0f7", - "reference": "877bb4b16ea573cc8c024e9590888fcf7eb7e0f7", + "url": "https://api.github.com/repos/symfony/finder/zipball/3ec095fab1800222732ca522a95dce8fa124007b", + "reference": "3ec095fab1800222732ca522a95dce8fa124007b", "shasum": "" }, "require": { @@ -3334,20 +3406,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2016-02-22 16:12:45" + "time": "2016-06-06 11:11:27" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.1.1", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "1289d16209491b584839022f29257ad859b8532d" + "reference": "dff51f72b0706335131b00a7f49606168c582594" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/1289d16209491b584839022f29257ad859b8532d", - "reference": "1289d16209491b584839022f29257ad859b8532d", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", + "reference": "dff51f72b0706335131b00a7f49606168c582594", "shasum": "" }, "require": { @@ -3359,7 +3431,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.2-dev" } }, "autoload": { @@ -3393,20 +3465,20 @@ "portable", "shim" ], - "time": "2016-01-20 09:13:37" + "time": "2016-05-18 14:26:46" }, { "name": "symfony/process", - "version": "v2.8.3", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "7dedd5b60550f33dca16dd7e94ef8aca8b67bbfe" + "reference": "115347d00c342198cdc52a7bd8bc15b5ab43500c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/7dedd5b60550f33dca16dd7e94ef8aca8b67bbfe", - "reference": "7dedd5b60550f33dca16dd7e94ef8aca8b67bbfe", + "url": "https://api.github.com/repos/symfony/process/zipball/115347d00c342198cdc52a7bd8bc15b5ab43500c", + "reference": "115347d00c342198cdc52a7bd8bc15b5ab43500c", "shasum": "" }, "require": { @@ -3442,20 +3514,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2016-02-02 13:33:15" + "time": "2016-06-06 11:11:27" }, { "name": "symfony/stopwatch", - "version": "v2.8.3", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "e3bc8e2a984f4382690a438c8bb650f3ffd71e73" + "reference": "5e628055488bcc42dbace3af65be435d094e37e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/e3bc8e2a984f4382690a438c8bb650f3ffd71e73", - "reference": "e3bc8e2a984f4382690a438c8bb650f3ffd71e73", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5e628055488bcc42dbace3af65be435d094e37e4", + "reference": "5e628055488bcc42dbace3af65be435d094e37e4", "shasum": "" }, "require": { @@ -3491,20 +3563,20 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2016-01-03 15:33:41" + "time": "2016-06-06 11:11:27" }, { "name": "symfony/translation", - "version": "v2.8.3", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "b7b4ebadd2b5e614ff7d2d6fc63e0ed0578909c7" + "reference": "8a1648d2e165ba87c759ba57d7f4c13d95fdf4a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/b7b4ebadd2b5e614ff7d2d6fc63e0ed0578909c7", - "reference": "b7b4ebadd2b5e614ff7d2d6fc63e0ed0578909c7", + "url": "https://api.github.com/repos/symfony/translation/zipball/8a1648d2e165ba87c759ba57d7f4c13d95fdf4a1", + "reference": "8a1648d2e165ba87c759ba57d7f4c13d95fdf4a1", "shasum": "" }, "require": { @@ -3555,24 +3627,25 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2016-02-02 09:49:18" + "time": "2016-06-06 11:11:27" }, { "name": "symfony/validator", - "version": "v2.8.3", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "3a529b9a428812c5ccb5e462c936e36f5492d716" + "reference": "4c8f9fd8e2150dbc4745ef13378e690588365df0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/3a529b9a428812c5ccb5e462c936e36f5492d716", - "reference": "3a529b9a428812c5ccb5e462c936e36f5492d716", + "url": "https://api.github.com/repos/symfony/validator/zipball/4c8f9fd8e2150dbc4745ef13378e690588365df0", + "reference": "4c8f9fd8e2150dbc4745ef13378e690588365df0", "shasum": "" }, "require": { "php": ">=5.3.9", + "symfony/polyfill-mbstring": "~1.0", "symfony/translation": "~2.4|~3.0.0" }, "require-dev": { @@ -3582,7 +3655,7 @@ "symfony/config": "~2.2|~3.0.0", "symfony/expression-language": "~2.4|~3.0.0", "symfony/http-foundation": "~2.1|~3.0.0", - "symfony/intl": "~2.4|~3.0.0", + "symfony/intl": "~2.7.4|~2.8|~3.0.0", "symfony/property-access": "~2.3|~3.0.0", "symfony/yaml": "~2.0,>=2.0.5|~3.0.0" }, @@ -3627,20 +3700,20 @@ ], "description": "Symfony Validator Component", "homepage": "https://symfony.com", - "time": "2016-02-23 18:27:29" + "time": "2016-04-14 08:48:44" }, { "name": "twig/twig", - "version": "v1.24.0", + "version": "v1.24.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "3e5aa30ebfbafd5951fb1b01e338e1800ce7e0e8" + "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/3e5aa30ebfbafd5951fb1b01e338e1800ce7e0e8", - "reference": "3e5aa30ebfbafd5951fb1b01e338e1800ce7e0e8", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/3566d311a92aae4deec6e48682dc5a4528c4a512", + "reference": "3566d311a92aae4deec6e48682dc5a4528c4a512", "shasum": "" }, "require": { @@ -3688,7 +3761,7 @@ "keywords": [ "templating" ], - "time": "2016-01-25 21:22:18" + "time": "2016-05-30 09:11:59" }, { "name": "zendframework/zend-cache", diff --git a/tests/_support/Helper/DataSetup.php b/tests/_support/Helper/DataSetup.php index a8800b1b..0da95e8e 100644 --- a/tests/_support/Helper/DataSetup.php +++ b/tests/_support/Helper/DataSetup.php @@ -108,6 +108,8 @@ class DataSetup extends \Codeception\Module { private $server; /** @var IUserManager */ private $userManager; + /** @var Share\IManager */ + private $shareManager; /** @var IRootFolder */ private $rootFolder; /** @var array */ @@ -128,6 +130,7 @@ class DataSetup extends \Codeception\Module { $this->server = $this->container->getServer(); $this->rootFolder = $this->server->getRootFolder(); $this->userManager = $this->server->getUserManager(); + $this->shareManager = $this->server->getShareManager(); /** * Logging hooks are missing at the moment, so we need to disable encryption @@ -395,6 +398,7 @@ class DataSetup extends \Codeception\Module { * @return bool|string */ protected function createShare($nodeType, $shareWith = null) { + $share = $this->shareManager->newShare(); /** * Pick the file or the folder */ @@ -403,12 +407,16 @@ class DataSetup extends \Codeception\Module { } else { $sharedNode = $this->sharedFolder; } - $fileInfo = $sharedNode->getFileInfo(); + + $share->setNode($sharedNode) + ->setPermissions(\OCP\Constants::PERMISSION_READ) + ->setSharedBy($this->sharerUserId); /** * Decide which type of share it is */ $shareType = \OCP\Share::SHARE_TYPE_USER; + if ($shareWith === null) { // We need to make sure sharing via link is enabled $this->server->getConfig() @@ -416,19 +424,19 @@ class DataSetup extends \Codeception\Module { // Only password protect the folders if ($nodeType === 'folder') { - $shareWith = $this->passwordForFolderShare; + $share->setPassword($this->passwordForFolderShare); } $shareType = \OCP\Share::SHARE_TYPE_LINK; + } else { + $share->setSharedWith($shareWith); } - /** - * Share and generate the token if it's a public share - */ + $share->setShareType($shareType); - return Share::shareItem( - $nodeType, $fileInfo['fileid'], $shareType, $shareWith, - \OCP\Constants::PERMISSION_ALL - ); + $this->shareManager->createShare($share); + + return $share->getToken(); + } } diff --git a/tests/_support/Page/Acceptance/Login.php b/tests/_support/Page/Acceptance/Login.php index aea79329..c6270402 100644 --- a/tests/_support/Page/Acceptance/Login.php +++ b/tests/_support/Page/Acceptance/Login.php @@ -57,7 +57,7 @@ class Login { public function confirmLogin() { $I = $this->acceptanceTester; - $I->seeCurrentUrlEquals(FilesPage::$URL); + $I->seeInCurrentUrl(FilesPage::$URL); $I->seeElement(['css' => FilesPage::$contentDiv]); } } diff --git a/tests/unit/controller/FilesControllerTest.php b/tests/unit/controller/FilesControllerTest.php index a26ebcfc..7faeb95f 100644 --- a/tests/unit/controller/FilesControllerTest.php +++ b/tests/unit/controller/FilesControllerTest.php @@ -182,10 +182,11 @@ class FilesControllerTest extends \Test\GalleryUnitTest { 'design' => [], ]; - $folder = $this->mockFolder( - 'home::user', $folderId, $files, true, false, null, '', false, $folderIsShared, - $folderEtag, 4096, 'some/path', null, $folderPermissions - ); + $folderData = ['home::user', $folderId, $files, true, false, null, '', false, $folderIsShared, + $folderEtag, 4096, 'some/path', null, $folderPermissions]; + + $folder = call_user_func_array([$this,'mockFolder'], $folderData); + $folder2 = call_user_func_array([$this, 'mockFolder'], $folderData); return [ [ @@ -199,7 +200,7 @@ class FilesControllerTest extends \Test\GalleryUnitTest { ] ], [ - $location, $folderPathFromRoot, $folder, $albumConfig, $files, $albums, $folderEtag, + $location, $folderPathFromRoot, $folder2, $albumConfig, $files, $albums, $folderEtag, [ 'files' => [], 'albums' => [], diff --git a/tests/unit/service/SearchMediaServiceTest.php b/tests/unit/service/SearchMediaServiceTest.php index 38bddfb6..b6a2a082 100644 --- a/tests/unit/service/SearchMediaServiceTest.php +++ b/tests/unit/service/SearchMediaServiceTest.php @@ -225,8 +225,17 @@ class SearchMediaServiceTest extends \Test\GalleryUnitTest { [$folder5, $folder5Path], ]; // 1 standard folder, 1 external share (ignored) and 3 files + $folder1a = $this->mockFolder( + 'home::user', 545454, + [ + $this->mockJpgFile(11111), + $this->mockJpgFile(22222), + $this->mockJpgFile(33333) + ], + $isReadable, $mounted, $mount, $query, $queryResult + ); $config5 = [ - $folder1, + $folder1a, $folder6, $this->mockJpgFile(77777), $this->mockJpgFile(88888), @@ -239,12 +248,21 @@ class SearchMediaServiceTest extends \Test\GalleryUnitTest { ); $map5 = [ [$topFolder5, ''], - [$folder1, $folder1Path], + [$folder1a, $folder1Path], [$folder6, $folder6Path], ]; // 1 standard folder (3), 1 deep folder and 3 files + $folder1b = $this->mockFolder( + 'home::user', 545454, + [ + $this->mockJpgFile(11111), + $this->mockJpgFile(22222), + $this->mockJpgFile(33333) + ], + $isReadable, $mounted, $mount, $query, $queryResult + ); $config6 = [ - $folder1, + $folder1b, $folder7, $this->mockJpgFile(77777), $this->mockJpgFile(88888), @@ -256,7 +274,7 @@ class SearchMediaServiceTest extends \Test\GalleryUnitTest { ); $map6 = [ [$topFolder6, ''], - [$folder1, $folder1Path], + [$folder1b, $folder1Path], [$folder7, $folder7Path], ]; @@ -331,6 +349,11 @@ class SearchMediaServiceTest extends \Test\GalleryUnitTest { $file1Data['etag'], $file1Data['size'], $file1Data['sharedwithuser'], null, $file1Data['permissions'] ); + $file1a = $this->mockJpgFile( + $file1Data['nodeid'], 'home::user', $isReadable, $file1Data['path'], + $file1Data['etag'], $file1Data['size'], $file1Data['sharedwithuser'], null, + $file1Data['permissions'] + ); $ownerUid = 909090; $ownerName = 'San Akinamoura'; @@ -400,7 +423,7 @@ class SearchMediaServiceTest extends \Test\GalleryUnitTest { 'home::user', $topFolder1Data['nodeid'], [ - $file1, + $file1a, $albumIgnored ], $isReadable, $mounted, $mount, $query, $queryResult, $topFolder1Data['sharedwithuser'], @@ -415,7 +438,7 @@ class SearchMediaServiceTest extends \Test\GalleryUnitTest { [$album1, $album1Data['path']], ]; $map2 = [ - [$file1, $file1Data['path']], + [$file1a, $file1Data['path']], [$topFolder2, $topFolder2Data['path']], ]; diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE new file mode 100644 index 00000000..1a281248 --- /dev/null +++ b/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) 2016 Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 4a5f6a68..7a62b933 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -23,19 +23,26 @@ class ComposerAutoloaderInit3cfd72445e0ad28db5332442bcda1e66 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); spl_autoload_unregister(array('ComposerAutoloaderInit3cfd72445e0ad28db5332442bcda1e66', 'loadClassLoader')); - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } + $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION'); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } + call_user_func(\Composer\Autoload\ComposerStaticInit3cfd72445e0ad28db5332442bcda1e66::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } } $loader->register(true); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php new file mode 100644 index 00000000..90389086 --- /dev/null +++ b/vendor/composer/autoload_static.php @@ -0,0 +1,45 @@ + + array ( + 'Symfony\\Component\\Yaml\\' => 23, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'Symfony\\Component\\Yaml\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/yaml', + ), + ); + + public static $classMap = array ( + 'Symfony\\Component\\Yaml\\Dumper' => __DIR__ . '/..' . '/symfony/yaml/Dumper.php', + 'Symfony\\Component\\Yaml\\Escaper' => __DIR__ . '/..' . '/symfony/yaml/Escaper.php', + 'Symfony\\Component\\Yaml\\Exception\\DumpException' => __DIR__ . '/..' . '/symfony/yaml/Exception/DumpException.php', + 'Symfony\\Component\\Yaml\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/yaml/Exception/ExceptionInterface.php', + 'Symfony\\Component\\Yaml\\Exception\\ParseException' => __DIR__ . '/..' . '/symfony/yaml/Exception/ParseException.php', + 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' => __DIR__ . '/..' . '/symfony/yaml/Exception/RuntimeException.php', + 'Symfony\\Component\\Yaml\\Inline' => __DIR__ . '/..' . '/symfony/yaml/Inline.php', + 'Symfony\\Component\\Yaml\\Parser' => __DIR__ . '/..' . '/symfony/yaml/Parser.php', + 'Symfony\\Component\\Yaml\\Unescaper' => __DIR__ . '/..' . '/symfony/yaml/Unescaper.php', + 'Symfony\\Component\\Yaml\\Yaml' => __DIR__ . '/..' . '/symfony/yaml/Yaml.php', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit3cfd72445e0ad28db5332442bcda1e66::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit3cfd72445e0ad28db5332442bcda1e66::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit3cfd72445e0ad28db5332442bcda1e66::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index cf8f836e..6c155d18 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,23 +1,23 @@ [ { "name": "symfony/yaml", - "version": "v2.8.3", - "version_normalized": "2.8.3.0", + "version": "v2.8.7", + "version_normalized": "2.8.7.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "2a4ee40acb880c56f29fb1b8886e7ffe94f3b995" + "reference": "815fabf3f48c7d1df345a69d1ad1a88f59757b34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/2a4ee40acb880c56f29fb1b8886e7ffe94f3b995", - "reference": "2a4ee40acb880c56f29fb1b8886e7ffe94f3b995", + "url": "https://api.github.com/repos/symfony/yaml/zipball/815fabf3f48c7d1df345a69d1ad1a88f59757b34", + "reference": "815fabf3f48c7d1df345a69d1ad1a88f59757b34", "shasum": "" }, "require": { "php": ">=5.3.9" }, - "time": "2016-02-23 07:41:20", + "time": "2016-06-06 11:11:27", "type": "library", "extra": { "branch-alias": { diff --git a/vendor/symfony/yaml/Dumper.php b/vendor/symfony/yaml/Dumper.php index 39cdcfc5..9bd9389c 100644 --- a/vendor/symfony/yaml/Dumper.php +++ b/vendor/symfony/yaml/Dumper.php @@ -32,6 +32,10 @@ class Dumper */ public function setIndentation($num) { + if ($num < 1) { + throw new \InvalidArgumentException('The indentation must be greater than zero.'); + } + $this->indentation = (int) $num; } @@ -54,7 +58,7 @@ class Dumper if ($inline <= 0 || !is_array($input) || empty($input)) { $output .= $prefix.Inline::dump($input, $exceptionOnInvalidType, $objectSupport); } else { - $isAHash = array_keys($input) !== range(0, count($input) - 1); + $isAHash = Inline::isHash($input); foreach ($input as $key => $value) { $willBeInlined = $inline - 1 <= 0 || !is_array($value) || empty($value); diff --git a/vendor/symfony/yaml/Inline.php b/vendor/symfony/yaml/Inline.php index bb2db360..717cbfd5 100644 --- a/vendor/symfony/yaml/Inline.php +++ b/vendor/symfony/yaml/Inline.php @@ -157,6 +157,28 @@ class Inline } } + /** + * Check if given array is hash or just normal indexed array. + * + * @internal + * + * @param array $value The PHP array to check + * + * @return bool true if value is hash array, false otherwise + */ + public static function isHash(array $value) + { + $expectedKey = 0; + + foreach ($value as $key => $val) { + if ($key !== $expectedKey++) { + return true; + } + } + + return false; + } + /** * Dumps a PHP array to a YAML string. * @@ -169,11 +191,7 @@ class Inline private static function dumpArray($value, $exceptionOnInvalidType, $objectSupport) { // array - $keys = array_keys($value); - $keysCount = count($keys); - if ((1 === $keysCount && '0' == $keys[0]) - || ($keysCount > 1 && array_reduce($keys, function ($v, $w) { return (int) $v + $w; }, 0) === $keysCount * ($keysCount - 1) / 2) - ) { + if ($value && !self::isHash($value)) { $output = array(); foreach ($value as $val) { $output[] = self::dump($val, $exceptionOnInvalidType, $objectSupport); @@ -182,7 +200,7 @@ class Inline return sprintf('[%s]', implode(', ', $output)); } - // mapping + // hash $output = array(); foreach ($value as $key => $val) { $output[] = sprintf('%s: %s', self::dump($key, $exceptionOnInvalidType, $objectSupport), self::dump($val, $exceptionOnInvalidType, $objectSupport)); diff --git a/vendor/symfony/yaml/Parser.php b/vendor/symfony/yaml/Parser.php index 41134e6b..3c02243d 100644 --- a/vendor/symfony/yaml/Parser.php +++ b/vendor/symfony/yaml/Parser.php @@ -25,6 +25,7 @@ class Parser const FOLDED_SCALAR_PATTERN = self::BLOCK_SCALAR_HEADER_PATTERN; private $offset = 0; + private $totalNumberOfLines; private $lines = array(); private $currentLineNb = -1; private $currentLine = ''; @@ -33,11 +34,13 @@ class Parser /** * Constructor. * - * @param int $offset The offset of YAML document (used for line numbers in error messages) + * @param int $offset The offset of YAML document (used for line numbers in error messages) + * @param int|null $totalNumberOfLines The overall number of lines being parsed */ - public function __construct($offset = 0) + public function __construct($offset = 0, $totalNumberOfLines = null) { $this->offset = $offset; + $this->totalNumberOfLines = $totalNumberOfLines; } /** @@ -62,6 +65,10 @@ class Parser $value = $this->cleanup($value); $this->lines = explode("\n", $value); + if (null === $this->totalNumberOfLines) { + $this->totalNumberOfLines = count($this->lines); + } + if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) { $mbEncoding = mb_internal_encoding(); mb_internal_encoding('UTF-8'); @@ -83,7 +90,7 @@ class Parser $isRef = $mergeNode = false; if (preg_match('#^\-((?P\s+)(?P.+?))?\s*$#u', $this->currentLine, $values)) { if ($context && 'mapping' == $context) { - throw new ParseException('You cannot define a sequence item when in a mapping'); + throw new ParseException('You cannot define a sequence item when in a mapping', $this->getRealCurrentLineNb() + 1, $this->currentLine); } $context = 'sequence'; @@ -95,7 +102,7 @@ class Parser // array if (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) { $c = $this->getRealCurrentLineNb() + 1; - $parser = new self($c); + $parser = new self($c, $this->totalNumberOfLines); $parser->refs = &$this->refs; $data[] = $parser->parse($this->getNextEmbedBlock(null, true), $exceptionOnInvalidType, $objectSupport, $objectForMap); } else { @@ -104,7 +111,7 @@ class Parser ) { // this is a compact notation element, add to next block and parse $c = $this->getRealCurrentLineNb(); - $parser = new self($c); + $parser = new self($c, $this->totalNumberOfLines); $parser->refs = &$this->refs; $block = $values['value']; @@ -122,7 +129,7 @@ class Parser } } elseif (preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\[\{].*?) *\:(\s+(?P.+?))?\s*$#u', $this->currentLine, $values) && (false === strpos($values['key'], ' #') || in_array($values['key'][0], array('"', "'")))) { if ($context && 'sequence' == $context) { - throw new ParseException('You cannot define a mapping item when in a sequence'); + throw new ParseException('You cannot define a mapping item when in a sequence', $this->currentLineNb + 1, $this->currentLine); } $context = 'mapping'; @@ -169,7 +176,7 @@ class Parser $value = $this->getNextEmbedBlock(); } $c = $this->getRealCurrentLineNb() + 1; - $parser = new self($c); + $parser = new self($c, $this->totalNumberOfLines); $parser->refs = &$this->refs; $parsed = $parser->parse($value, $exceptionOnInvalidType, $objectSupport, $objectForMap); @@ -220,7 +227,7 @@ class Parser } } else { $c = $this->getRealCurrentLineNb() + 1; - $parser = new self($c); + $parser = new self($c, $this->totalNumberOfLines); $parser->refs = &$this->refs; $value = $parser->parse($this->getNextEmbedBlock(), $exceptionOnInvalidType, $objectSupport, $objectForMap); // Spec: Keys MUST be unique; first one wins. @@ -243,7 +250,7 @@ class Parser } else { // multiple documents are not supported if ('---' === $this->currentLine) { - throw new ParseException('Multiple documents are not supported.'); + throw new ParseException('Multiple documents are not supported.', $this->currentLineNb + 1, $this->currentLine); } // 1-liner optionally followed by newline(s) @@ -490,7 +497,7 @@ class Parser } if (!array_key_exists($value, $this->refs)) { - throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLine); + throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine); } return $this->refs[$value]; @@ -585,6 +592,8 @@ class Parser if ($notEOF) { $blockLines[] = ''; $this->moveToPreviousLine(); + } elseif (!$notEOF && !$this->isCurrentLineLastLineInDocument()) { + $blockLines[] = ''; } // folded style @@ -691,6 +700,11 @@ class Parser return '' !== $ltrimmedLine && $ltrimmedLine[0] === '#'; } + private function isCurrentLineLastLineInDocument() + { + return ($this->offset + $this->currentLineNb) >= ($this->totalNumberOfLines - 1); + } + /** * Cleanups a YAML string to be parsed. * @@ -768,7 +782,7 @@ class Parser */ private function isStringUnIndentedCollectionItem() { - return 0 === strpos($this->currentLine, '- '); + return '-' === rtrim($this->currentLine) || 0 === strpos($this->currentLine, '- '); } /** diff --git a/vendor/symfony/yaml/README.md b/vendor/symfony/yaml/README.md index 85a97867..0d324881 100644 --- a/vendor/symfony/yaml/README.md +++ b/vendor/symfony/yaml/README.md @@ -1,21 +1,13 @@ Yaml Component ============== -YAML implements most of the YAML 1.2 specification. - -```php -use Symfony\Component\Yaml\Yaml; - -$array = Yaml::parse(file_get_contents(filename)); - -print Yaml::dump($array); -``` +The Yaml component loads and dumps YAML files. Resources --------- -You can run the unit tests with the following command: - - $ cd path/to/Symfony/Component/Yaml/ - $ composer install - $ phpunit + * [Documentation](https://symfony.com/doc/current/components/yaml/index.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/yaml/Tests/DumperTest.php b/vendor/symfony/yaml/Tests/DumperTest.php index 2a0df692..84069d8a 100644 --- a/vendor/symfony/yaml/Tests/DumperTest.php +++ b/vendor/symfony/yaml/Tests/DumperTest.php @@ -228,6 +228,24 @@ EOF; 'paragraph-separator' => array("\t\\P", '"\t\\\\P"'), ); } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The indentation must be greater than zero + */ + public function testZeroIndentationThrowsException() + { + $this->dumper->setIndentation(0); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The indentation must be greater than zero + */ + public function testNegativeIndentationThrowsException() + { + $this->dumper->setIndentation(-4); + } } class A diff --git a/vendor/symfony/yaml/Tests/InlineTest.php b/vendor/symfony/yaml/Tests/InlineTest.php index f0f9b96b..e349bfcc 100644 --- a/vendor/symfony/yaml/Tests/InlineTest.php +++ b/vendor/symfony/yaml/Tests/InlineTest.php @@ -220,6 +220,24 @@ class InlineTest extends \PHPUnit_Framework_TestCase return array(array('|'), array('>')); } + /** + * @dataProvider getDataForIsHash + */ + public function testIsHash($array, $expected) + { + $this->assertSame($expected, Inline::isHash($array)); + } + + public function getDataForIsHash() + { + return array( + array(array(), false), + array(array(1, 2, 3), false), + array(array(2 => 1, 1 => 2, 0 => 3), true), + array(array('foo' => 1, 'bar' => 2), true), + ); + } + public function getTestsForParse() { return array( @@ -426,6 +444,8 @@ class InlineTest extends \PHPUnit_Framework_TestCase array('[foo, { bar: foo, foo: [foo, { bar: foo }] }, [foo, { bar: foo }]]', array('foo', array('bar' => 'foo', 'foo' => array('foo', array('bar' => 'foo'))), array('foo', array('bar' => 'foo')))), array('[foo, \'@foo.baz\', { \'%foo%\': \'foo is %foo%\', bar: \'%foo%\' }, true, \'@service_container\']', array('foo', '@foo.baz', array('%foo%' => 'foo is %foo%', 'bar' => '%foo%'), true, '@service_container')), + + array('{ foo: { bar: { 1: 2, baz: 3 } } }', array('foo' => array('bar' => array(1 => 2, 'baz' => 3)))), ); } } diff --git a/vendor/symfony/yaml/Tests/ParserTest.php b/vendor/symfony/yaml/Tests/ParserTest.php index d41c583e..d05ff391 100644 --- a/vendor/symfony/yaml/Tests/ParserTest.php +++ b/vendor/symfony/yaml/Tests/ParserTest.php @@ -596,7 +596,7 @@ EOF; /** * @expectedException \Symfony\Component\Yaml\Exception\ParseException - * @expectedExceptionMessage Multiple documents are not supported. + * @expectedExceptionMessageRegExp /^Multiple documents are not supported.+/ */ public function testMultipleDocumentsNotSupportedException() { @@ -628,6 +628,34 @@ EOF ); } + public function testSequenceInMappingStartedBySingleDashLine() + { + $yaml = << array( + array( + 'b' => array( + array( + 'bar' => 'baz', + ), + ), + ), + 'foo', + ), + 'd' => 'e', + ); + + $this->assertSame($expected, $this->parser->parse($yaml)); + } + /** * @expectedException \Symfony\Component\Yaml\Exception\ParseException */ @@ -889,9 +917,13 @@ EOF; $deprecations = array(); set_error_handler(function ($type, $msg) use (&$deprecations) { - if (E_USER_DEPRECATED === $type) { - $deprecations[] = $msg; + if (E_USER_DEPRECATED !== $type) { + restore_error_handler(); + + return call_user_func_array('PHPUnit_Util_ErrorHandler::handleError', func_get_args()); } + + $deprecations[] = $msg; }); $this->parser->parse($yaml); @@ -989,6 +1021,7 @@ EOT foo # bar baz + EOT , ), @@ -1017,7 +1050,7 @@ EOT; $expected = array( 'foo' => array( 'bar' => array( - 'scalar-block' => 'line1 line2>', + 'scalar-block' => "line1 line2>\n", ), 'baz' => array( 'foobar' => null, diff --git a/vendor/symfony/yaml/Tests/YamlTest.php b/vendor/symfony/yaml/Tests/YamlTest.php index 8db65e39..883ee835 100644 --- a/vendor/symfony/yaml/Tests/YamlTest.php +++ b/vendor/symfony/yaml/Tests/YamlTest.php @@ -34,4 +34,22 @@ class YamlTest extends \PHPUnit_Framework_TestCase $parsedByContents = Yaml::parse($contents); $this->assertEquals($parsedByFilename, $parsedByContents); } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The indentation must be greater than zero + */ + public function testZeroIndentationThrowsException() + { + Yaml::dump(array('lorem' => 'ipsum', 'dolor' => 'sit'), 2, 0); + } + + /** + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage The indentation must be greater than zero + */ + public function testNegativeIndentationThrowsException() + { + Yaml::dump(array('lorem' => 'ipsum', 'dolor' => 'sit'), 2, -4); + } } diff --git a/vendor/symfony/yaml/Yaml.php b/vendor/symfony/yaml/Yaml.php index be05a365..37436549 100644 --- a/vendor/symfony/yaml/Yaml.php +++ b/vendor/symfony/yaml/Yaml.php @@ -88,6 +88,10 @@ class Yaml */ public static function dump($array, $inline = 2, $indent = 4, $exceptionOnInvalidType = false, $objectSupport = false) { + if ($indent < 1) { + throw new \InvalidArgumentException('The indentation must be greater than zero.'); + } + $yaml = new Dumper(); $yaml->setIndentation($indent);