"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "4d845f3c8b77c8d73bf92c9223ddd805",
+ "content-hash": "10825887b8f66d1d412b92bcc0ca864f",
"packages": [
+ {
+ "name": "aws/aws-crt-php",
+ "version": "v1.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/awslabs/aws-crt-php.git",
+ "reference": "3942776a8c99209908ee0b287746263725685732"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/3942776a8c99209908ee0b287746263725685732",
+ "reference": "3942776a8c99209908ee0b287746263725685732",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.35|^5.4.3"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
+ {
+ "name": "AWS SDK Common Runtime Team",
+ }
+ ],
+ "description": "AWS Common Runtime for PHP",
+ "homepage": "http://aws.amazon.com/sdkforphp",
+ "keywords": [
+ "amazon",
+ "aws",
+ "crt",
+ "sdk"
+ ],
+ "support": {
+ "issues": "https://github.com/awslabs/aws-crt-php/issues",
+ "source": "https://github.com/awslabs/aws-crt-php/tree/v1.0.2"
+ },
+ "time": "2021-09-03T22:57:30+00:00"
+ },
{
"name": "aws/aws-sdk-php",
- "version": "3.191.8",
+ "version": "3.194.1",
"source": {
"type": "git",
"url": "https://github.com/aws/aws-sdk-php.git",
- "reference": "949feb83cc0db46f07b12aa3128d47be3b9cca63"
+ "reference": "67bdee05acef9e8ad60098090996690b49babd09"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/949feb83cc0db46f07b12aa3128d47be3b9cca63",
- "reference": "949feb83cc0db46f07b12aa3128d47be3b9cca63",
+ "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/67bdee05acef9e8ad60098090996690b49babd09",
+ "reference": "67bdee05acef9e8ad60098090996690b49babd09",
"shasum": ""
},
"require": {
+ "aws/aws-crt-php": "^1.0.2",
"ext-json": "*",
"ext-pcre": "*",
"ext-simplexml": "*",
"support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues",
- "source": "https://github.com/aws/aws-sdk-php/tree/3.191.8"
+ "source": "https://github.com/aws/aws-sdk-php/tree/3.194.1"
},
- "time": "2021-08-31T18:18:02+00:00"
+ "time": "2021-09-17T18:15:42+00:00"
},
{
"name": "bacon/bacon-qr-code",
},
{
"name": "doctrine/dbal",
- "version": "2.13.2",
+ "version": "2.13.3",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
- "reference": "8dd39d2ead4409ce652fd4f02621060f009ea5e4"
+ "reference": "0d7adf4cadfee6f70850e5b163e6cdd706417838"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/dbal/zipball/8dd39d2ead4409ce652fd4f02621060f009ea5e4",
- "reference": "8dd39d2ead4409ce652fd4f02621060f009ea5e4",
+ "url": "https://api.github.com/repos/doctrine/dbal/zipball/0d7adf4cadfee6f70850e5b163e6cdd706417838",
+ "reference": "0d7adf4cadfee6f70850e5b163e6cdd706417838",
"shasum": ""
},
"require": {
},
"require-dev": {
"doctrine/coding-standard": "9.0.0",
- "jetbrains/phpstorm-stubs": "2020.2",
- "phpstan/phpstan": "0.12.81",
+ "jetbrains/phpstorm-stubs": "2021.1",
+ "phpstan/phpstan": "0.12.96",
"phpunit/phpunit": "^7.5.20|^8.5|9.5.5",
+ "psalm/plugin-phpunit": "0.16.1",
"squizlabs/php_codesniffer": "3.6.0",
"symfony/cache": "^4.4",
"symfony/console": "^2.0.5|^3.0|^4.0|^5.0",
- "vimeo/psalm": "4.6.4"
+ "vimeo/psalm": "4.10.0"
},
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
- "source": "https://github.com/doctrine/dbal/tree/2.13.2"
+ "source": "https://github.com/doctrine/dbal/tree/2.13.3"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2021-06-18T21:48:39+00:00"
+ "time": "2021-09-12T19:11:48+00:00"
},
{
"name": "doctrine/deprecations",
},
{
"name": "facade/flare-client-php",
- "version": "1.8.1",
+ "version": "1.9.1",
"source": {
"type": "git",
"url": "https://github.com/facade/flare-client-php.git",
- "reference": "47b639dc02bcfdfc4ebb83de703856fa01e35f5f"
+ "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/facade/flare-client-php/zipball/47b639dc02bcfdfc4ebb83de703856fa01e35f5f",
- "reference": "47b639dc02bcfdfc4ebb83de703856fa01e35f5f",
+ "url": "https://api.github.com/repos/facade/flare-client-php/zipball/b2adf1512755637d0cef4f7d1b54301325ac78ed",
+ "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed",
"shasum": ""
},
"require": {
],
"support": {
"issues": "https://github.com/facade/flare-client-php/issues",
- "source": "https://github.com/facade/flare-client-php/tree/1.8.1"
+ "source": "https://github.com/facade/flare-client-php/tree/1.9.1"
},
"funding": [
{
"type": "github"
}
],
- "time": "2021-05-31T19:23:29+00:00"
+ "time": "2021-09-13T12:16:46+00:00"
},
{
"name": "facade/ignition",
},
{
"name": "laravel/framework",
- "version": "v6.20.33",
+ "version": "v6.20.34",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
- "reference": "49aa211f2dd1d419bfd9dbbd6f590d57a1dfda58"
+ "reference": "72a6da88c90cee793513b3fe49cf0fcb368eefa0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/framework/zipball/49aa211f2dd1d419bfd9dbbd6f590d57a1dfda58",
- "reference": "49aa211f2dd1d419bfd9dbbd6f590d57a1dfda58",
+ "url": "https://api.github.com/repos/laravel/framework/zipball/72a6da88c90cee793513b3fe49cf0fcb368eefa0",
+ "reference": "72a6da88c90cee793513b3fe49cf0fcb368eefa0",
"shasum": ""
},
"require": {
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
- "time": "2021-08-31T13:56:36+00:00"
+ "time": "2021-09-07T13:28:55+00:00"
},
{
"name": "laravel/socialite",
},
{
"name": "league/html-to-markdown",
- "version": "5.0.0",
+ "version": "5.0.1",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/html-to-markdown.git",
- "reference": "c4dbebbebe0fe454b6b38e6c683a977615bd7dc2"
+ "reference": "e5600a2c5ce7b7571b16732c7086940f56f7abec"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thephpleague/html-to-markdown/zipball/c4dbebbebe0fe454b6b38e6c683a977615bd7dc2",
- "reference": "c4dbebbebe0fe454b6b38e6c683a977615bd7dc2",
+ "url": "https://api.github.com/repos/thephpleague/html-to-markdown/zipball/e5600a2c5ce7b7571b16732c7086940f56f7abec",
+ "reference": "e5600a2c5ce7b7571b16732c7086940f56f7abec",
"shasum": ""
},
"require": {
],
"support": {
"issues": "https://github.com/thephpleague/html-to-markdown/issues",
- "source": "https://github.com/thephpleague/html-to-markdown/tree/5.0.0"
+ "source": "https://github.com/thephpleague/html-to-markdown/tree/5.0.1"
},
"funding": [
{
"type": "github"
},
{
- "url": "https://www.patreon.com/colinodell",
- "type": "patreon"
+ "url": "https://tidelift.com/funding/github/packagist/league/html-to-markdown",
+ "type": "tidelift"
}
],
- "time": "2021-03-29T01:29:08+00:00"
+ "time": "2021-09-17T20:00:27+00:00"
},
{
"name": "league/mime-type-detection",
},
{
"name": "monolog/monolog",
- "version": "2.3.2",
+ "version": "2.3.4",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
- "reference": "71312564759a7db5b789296369c1a264efc43aad"
+ "reference": "437e7a1c50044b92773b361af77620efb76fff59"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Seldaek/monolog/zipball/71312564759a7db5b789296369c1a264efc43aad",
- "reference": "71312564759a7db5b789296369c1a264efc43aad",
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/437e7a1c50044b92773b361af77620efb76fff59",
+ "reference": "437e7a1c50044b92773b361af77620efb76fff59",
"shasum": ""
},
"require": {
"php": ">=7.2",
- "psr/log": "^1.0.1"
+ "psr/log": "^1.0.1 || ^2.0 || ^3.0"
},
"provide": {
- "psr/log-implementation": "1.0.0"
+ "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0"
},
"require-dev": {
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
"phpunit/phpunit": "^8.5",
"predis/predis": "^1.1",
"rollbar/rollbar": "^1.3",
- "ruflin/elastica": ">=0.90 <7.0.1",
+ "ruflin/elastica": ">=0.90@dev",
"swiftmailer/swiftmailer": "^5.3|^6.0"
},
"suggest": {
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
"elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
+ "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler",
"ext-mbstring": "Allow to work properly with unicode symbols",
"ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
+ "ext-openssl": "Required to send log messages using SSL",
+ "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)",
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
"mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
"php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
],
"support": {
"issues": "https://github.com/Seldaek/monolog/issues",
- "source": "https://github.com/Seldaek/monolog/tree/2.3.2"
+ "source": "https://github.com/Seldaek/monolog/tree/2.3.4"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2021-07-23T07:42:52+00:00"
+ "time": "2021-09-15T11:27:21+00:00"
},
{
"name": "mtdowling/jmespath.php",
},
{
"name": "nesbot/carbon",
- "version": "2.52.0",
+ "version": "2.53.1",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
- "reference": "369c0e2737c56a0f39c946dd261855255a6fccbe"
+ "reference": "f4655858a784988f880c1b8c7feabbf02dfdf045"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/369c0e2737c56a0f39c946dd261855255a6fccbe",
- "reference": "369c0e2737c56a0f39c946dd261855255a6fccbe",
+ "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f4655858a784988f880c1b8c7feabbf02dfdf045",
+ "reference": "f4655858a784988f880c1b8c7feabbf02dfdf045",
"shasum": ""
},
"require": {
},
"require-dev": {
"doctrine/orm": "^2.7",
- "friendsofphp/php-cs-fixer": "^2.14 || ^3.0",
+ "friendsofphp/php-cs-fixer": "^3.0",
"kylekatarnls/multi-tester": "^2.0",
"phpmd/phpmd": "^2.9",
"phpstan/extension-installer": "^1.0",
"type": "tidelift"
}
],
- "time": "2021-08-14T19:10:52+00:00"
+ "time": "2021-09-06T09:29:23+00:00"
},
{
"name": "nunomaduro/collision",
},
{
"name": "symfony/css-selector",
- "version": "v4.4.27",
+ "version": "v5.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6"
+ "reference": "7fb120adc7f600a59027775b224c13a33530dd90"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6",
- "reference": "5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/7fb120adc7f600a59027775b224c13a33530dd90",
+ "reference": "7fb120adc7f600a59027775b224c13a33530dd90",
"shasum": ""
},
"require": {
- "php": ">=7.1.3",
+ "php": ">=7.2.5",
"symfony/polyfill-php80": "^1.16"
},
"type": "library",
"description": "Converts CSS selectors to XPath expressions",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/css-selector/tree/v4.4.27"
+ "source": "https://github.com/symfony/css-selector/tree/v5.3.4"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2021-07-21T12:19:41+00:00"
+ "time": "2021-07-21T12:38:00+00:00"
},
{
"name": "symfony/debug",
},
{
"name": "composer/composer",
- "version": "2.1.6",
+ "version": "2.1.8",
"source": {
"type": "git",
"url": "https://github.com/composer/composer.git",
- "reference": "e5cac5f9d2354d08b67f1d21c664ae70d748c603"
+ "reference": "24d38e9686092de05214cafa187dc282a5d89497"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/composer/zipball/e5cac5f9d2354d08b67f1d21c664ae70d748c603",
- "reference": "e5cac5f9d2354d08b67f1d21c664ae70d748c603",
+ "url": "https://api.github.com/repos/composer/composer/zipball/24d38e9686092de05214cafa187dc282a5d89497",
+ "reference": "24d38e9686092de05214cafa187dc282a5d89497",
"shasum": ""
},
"require": {
"support": {
"irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/composer/issues",
- "source": "https://github.com/composer/composer/tree/2.1.6"
+ "source": "https://github.com/composer/composer/tree/2.1.8"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2021-08-19T15:11:08+00:00"
+ "time": "2021-09-15T11:55:15+00:00"
},
{
"name": "composer/metadata-minifier",
},
{
"name": "fakerphp/faker",
- "version": "v1.15.0",
+ "version": "v1.16.0",
"source": {
"type": "git",
"url": "https://github.com/FakerPHP/Faker.git",
- "reference": "89c6201c74db25fa759ff16e78a4d8f32547770e"
+ "reference": "271d384d216e5e5c468a6b28feedf95d49f83b35"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/89c6201c74db25fa759ff16e78a4d8f32547770e",
- "reference": "89c6201c74db25fa759ff16e78a4d8f32547770e",
+ "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/271d384d216e5e5c468a6b28feedf95d49f83b35",
+ "reference": "271d384d216e5e5c468a6b28feedf95d49f83b35",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0",
- "psr/container": "^1.0",
+ "psr/container": "^1.0 || ^2.0",
"symfony/deprecation-contracts": "^2.2"
},
"conflict": {
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "v1.15-dev"
+ "dev-main": "v1.16-dev"
}
},
"autoload": {
],
"support": {
"issues": "https://github.com/FakerPHP/Faker/issues",
- "source": "https://github.com/FakerPHP/Faker/tree/v1.15.0"
+ "source": "https://github.com/FakerPHP/Faker/tree/v1.16.0"
},
- "time": "2021-07-06T20:39:40+00:00"
+ "time": "2021-09-06T14:53:37+00:00"
},
{
"name": "hamcrest/hamcrest-php",
},
"time": "2021-07-22T09:24:00+00:00"
},
- {
- "name": "laravel/browser-kit-testing",
- "version": "v5.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/laravel/browser-kit-testing.git",
- "reference": "fa0efb279c009e2a276f934f8aff946caf66edc7"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/laravel/browser-kit-testing/zipball/fa0efb279c009e2a276f934f8aff946caf66edc7",
- "reference": "fa0efb279c009e2a276f934f8aff946caf66edc7",
- "shasum": ""
- },
- "require": {
- "ext-dom": "*",
- "ext-json": "*",
- "illuminate/contracts": "~5.7.0|~5.8.0|^6.0",
- "illuminate/database": "~5.7.0|~5.8.0|^6.0",
- "illuminate/http": "~5.7.0|~5.8.0|^6.0",
- "illuminate/support": "~5.7.0|~5.8.0|^6.0",
- "mockery/mockery": "^1.0",
- "php": "^7.1.3|^8.0",
- "phpunit/phpunit": "^7.5|^8.0|^9.3",
- "symfony/console": "^4.2",
- "symfony/css-selector": "^4.2",
- "symfony/dom-crawler": "^4.2",
- "symfony/http-foundation": "^4.2",
- "symfony/http-kernel": "^4.2"
- },
- "require-dev": {
- "laravel/framework": "~5.7.0|~5.8.0|^6.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "5.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Laravel\\BrowserKitTesting\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Taylor Otwell",
- }
- ],
- "description": "Provides backwards compatibility for BrowserKit testing in the latest Laravel release.",
- "keywords": [
- "laravel",
- "testing"
- ],
- "support": {
- "issues": "https://github.com/laravel/browser-kit-testing/issues",
- "source": "https://github.com/laravel/browser-kit-testing/tree/v5.2.0"
- },
- "time": "2020-10-30T08:49:09+00:00"
- },
{
"name": "maximebf/debugbar",
"version": "v1.17.1",
},
{
"name": "mockery/mockery",
- "version": "1.4.3",
+ "version": "1.4.4",
"source": {
"type": "git",
"url": "https://github.com/mockery/mockery.git",
- "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea"
+ "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/mockery/mockery/zipball/d1339f64479af1bee0e82a0413813fe5345a54ea",
- "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea",
+ "url": "https://api.github.com/repos/mockery/mockery/zipball/e01123a0e847d52d186c5eb4b9bf58b0c6d00346",
+ "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346",
"shasum": ""
},
"require": {
],
"support": {
"issues": "https://github.com/mockery/mockery/issues",
- "source": "https://github.com/mockery/mockery/tree/1.4.3"
+ "source": "https://github.com/mockery/mockery/tree/1.4.4"
},
- "time": "2021-02-24T09:51:49+00:00"
+ "time": "2021-09-13T15:28:59+00:00"
},
{
"name": "myclabs/deep-copy",
},
{
"name": "phpdocumentor/type-resolver",
- "version": "1.4.0",
+ "version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0"
+ "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
- "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30f38bffc6f24293dadd1823936372dfa9e86e2f",
+ "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f",
"shasum": ""
},
"require": {
"phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
- "ext-tokenizer": "*"
+ "ext-tokenizer": "*",
+ "psalm/phar": "^4.8"
},
"type": "library",
"extra": {
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
- "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0"
+ "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.0"
},
- "time": "2020-09-17T18:55:26+00:00"
+ "time": "2021-09-17T15:28:14+00:00"
},
{
"name": "phpspec/prophecy",
- "version": "1.13.0",
+ "version": "1.14.0",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea"
+ "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea",
- "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e",
+ "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.2",
- "php": "^7.2 || ~8.0, <8.1",
+ "php": "^7.2 || ~8.0, <8.2",
"phpdocumentor/reflection-docblock": "^5.2",
"sebastian/comparator": "^3.0 || ^4.0",
"sebastian/recursion-context": "^3.0 || ^4.0"
},
"require-dev": {
- "phpspec/phpspec": "^6.0",
+ "phpspec/phpspec": "^6.0 || ^7.0",
"phpunit/phpunit": "^8.0 || ^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.11.x-dev"
+ "dev-master": "1.x-dev"
}
},
"autoload": {
],
"support": {
"issues": "https://github.com/phpspec/prophecy/issues",
- "source": "https://github.com/phpspec/prophecy/tree/1.13.0"
+ "source": "https://github.com/phpspec/prophecy/tree/1.14.0"
},
- "time": "2021-03-17T13:42:18+00:00"
+ "time": "2021-09-10T09:02:12+00:00"
},
{
"name": "phpunit/php-code-coverage",
- "version": "9.2.6",
+ "version": "9.2.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "f6293e1b30a2354e8428e004689671b83871edde"
+ "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde",
- "reference": "f6293e1b30a2354e8428e004689671b83871edde",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218",
+ "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
- "nikic/php-parser": "^4.10.2",
+ "nikic/php-parser": "^4.12.0",
"php": ">=7.3",
"phpunit/php-file-iterator": "^3.0.3",
"phpunit/php-text-template": "^2.0.2",
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6"
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7"
},
"funding": [
{
"type": "github"
}
],
- "time": "2021-03-28T07:26:59+00:00"
+ "time": "2021-09-17T05:39:03+00:00"
},
{
"name": "phpunit/php-file-iterator",
},
{
"name": "symfony/dom-crawler",
- "version": "v4.4.30",
+ "version": "v5.3.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
- "reference": "4632ae3567746c7e915c33c67a2fb6ab746090c4"
+ "reference": "c7eef3a60ccfdd8eafe07f81652e769ac9c7146c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/4632ae3567746c7e915c33c67a2fb6ab746090c4",
- "reference": "4632ae3567746c7e915c33c67a2fb6ab746090c4",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/c7eef3a60ccfdd8eafe07f81652e769ac9c7146c",
+ "reference": "c7eef3a60ccfdd8eafe07f81652e769ac9c7146c",
"shasum": ""
},
"require": {
- "php": ">=7.1.3",
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php80": "^1.16"
},
"require-dev": {
"masterminds/html5": "^2.6",
- "symfony/css-selector": "^3.4|^4.0|^5.0"
+ "symfony/css-selector": "^4.4|^5.0"
},
"suggest": {
"symfony/css-selector": ""
"description": "Eases DOM navigation for HTML and XML documents",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/dom-crawler/tree/v4.4.30"
+ "source": "https://github.com/symfony/dom-crawler/tree/v5.3.7"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2021-08-28T15:40:01+00:00"
+ "time": "2021-08-29T19:32:13+00:00"
},
{
"name": "symfony/filesystem",
namespace Tests\Permissions;
+use BookStack\Actions\ActivityType;
use BookStack\Actions\Comment;
use BookStack\Auth\Role;
use BookStack\Auth\User;
use BookStack\Entities\Models\Book;
use BookStack\Entities\Models\Bookshelf;
use BookStack\Entities\Models\Chapter;
+use BookStack\Entities\Models\Entity;
use BookStack\Entities\Models\Page;
use BookStack\Uploads\Image;
use Tests\TestCase;
$testRoleUpdateName = 'An Super Updated role';
// Creation
- $this->asAdmin()->get('/settings')
- ->click('Roles')
- ->seePageIs('/settings/roles')
- ->click('Create New Role')
- ->type('Test Role', 'display_name')
- ->type('A little test description', 'description')
- ->press('Save Role')
- ->assertDatabaseHas('roles', ['display_name' => $testRoleName, 'description' => $testRoleDesc, 'mfa_enforced' => false])
- ->seePageIs('/settings/roles');
+ $resp = $this->asAdmin()->get('/settings');
+ $resp->assertElementContains('a[href="' . url('/settings/roles') . '"]', 'Roles');
+
+ $resp = $this->get('/settings/roles');
+ $resp->assertElementContains('a[href="' . url('/settings/roles/new') . '"]', 'Create New Role');
+
+ $resp = $this->get('/settings/roles/new');
+ $resp->assertElementContains('form[action="' . url('/settings/roles/new') . '"]', 'Save Role');
+
+ $resp = $this->post('/settings/roles/new', [
+ 'display_name' => $testRoleName,
+ 'description' => $testRoleDesc,
+ ]);
+ $resp->assertRedirect('/settings/roles');
+
+ $resp = $this->get('/settings/roles');
+ $resp->assertSee($testRoleName);
+ $resp->assertSee($testRoleDesc);
+ $this->assertDatabaseHas('roles', [
+ 'display_name' => $testRoleName,
+ 'description' => $testRoleDesc,
+ 'mfa_enforced' => false,
+ ]);
+
+ /** @var Role $role */
+ $role = Role::query()->where('display_name', '=', $testRoleName)->first();
// Updating
- $this->asAdmin()->get('/settings/roles')
- ->assertSee($testRoleDesc)
- ->click($testRoleName)
- ->type($testRoleUpdateName, '#display_name')
- ->check('#mfa_enforced')
- ->press('Save Role')
- ->assertDatabaseHas('roles', ['display_name' => $testRoleUpdateName, 'description' => $testRoleDesc, 'mfa_enforced' => true])
- ->seePageIs('/settings/roles');
+ $resp = $this->get('/settings/roles/' . $role->id);
+ $resp->assertSee($testRoleName);
+ $resp->assertSee($testRoleDesc);
+ $resp->assertElementContains('form[action="' . url('/settings/roles/' . $role->id) . '"]', 'Save Role');
+
+ $resp = $this->put('/settings/roles/' . $role->id, [
+ 'display_name' => $testRoleUpdateName,
+ 'description' => $testRoleDesc,
+ 'mfa_enforced' => 'true',
+ ]);
+ $resp->assertRedirect('/settings/roles');
+ $this->assertDatabaseHas('roles', [
+ 'display_name' => $testRoleUpdateName,
+ 'description' => $testRoleDesc,
+ 'mfa_enforced' => true,
+ ]);
// Deleting
- $this->asAdmin()->get('/settings/roles')
- ->click($testRoleUpdateName)
- ->click('Delete Role')
- ->assertSee($testRoleUpdateName)
- ->press('Confirm')
- ->seePageIs('/settings/roles')
- ->assertDontSee($testRoleUpdateName);
+ $resp = $this->get('/settings/roles/' . $role->id);
+ $resp->assertElementContains('a[href="' . url("/settings/roles/delete/$role->id") . '"]', 'Delete Role');
+
+ $resp = $this->get("/settings/roles/delete/$role->id");
+ $resp->assertSee($testRoleUpdateName);
+ $resp->assertElementContains('form[action="' . url("/settings/roles/delete/$role->id") . '"]', 'Confirm');
+
+ $resp = $this->delete("/settings/roles/delete/$role->id");
+ $resp->assertRedirect('/settings/roles');
+ $this->get('/settings/roles')->assertSee('Role successfully deleted');
+ $this->assertActivityExists(ActivityType::ROLE_DELETE);
}
public function test_admin_role_cannot_be_removed_if_user_last_admin()
{
- $adminRole = Role::where('system_name', '=', 'admin')->first();
+ /** @var Role $adminRole */
+ $adminRole = Role::query()->where('system_name', '=', 'admin')->first();
$adminUser = $this->getAdmin();
$adminRole->users()->where('id', '!=', $adminUser->id)->delete();
- $this->assertEquals($adminRole->users()->count(), 1);
+ $this->assertEquals(1, $adminRole->users()->count());
$viewerRole = $this->getViewer()->roles()->first();
$editUrl = '/settings/users/' . $adminUser->id;
- $this->actingAs($adminUser)->put($editUrl, [
+ $resp = $this->actingAs($adminUser)->put($editUrl, [
'name' => $adminUser->name,
'email' => $adminUser->email,
'roles' => [
'viewer' => strval($viewerRole->id),
],
- ])->followRedirects();
+ ]);
- $this->seePageIs($editUrl);
- $this->assertSee('This user is the only user assigned to the administrator role');
+ $resp->assertRedirect($editUrl);
+
+ $resp = $this->get($editUrl);
+ $resp->assertSee('This user is the only user assigned to the administrator role');
}
public function test_migrate_users_on_delete_works()
{
+ /** @var Role $roleA */
$roleA = Role::query()->create(['display_name' => 'Delete Test A']);
+ /** @var Role $roleB */
$roleB = Role::query()->create(['display_name' => 'Delete Test B']);
$this->user->attachRole($roleB);
$this->assertCount(0, $roleA->users()->get());
$this->assertCount(1, $roleB->users()->get());
- $deletePage = $this->asAdmin()->get("/settings/roles/delete/{$roleB->id}");
+ $deletePage = $this->asAdmin()->get("/settings/roles/delete/$roleB->id");
$deletePage->assertElementExists('select[name=migrate_role_id]');
- $this->asAdmin()->delete("/settings/roles/delete/{$roleB->id}", [
+ $this->asAdmin()->delete("/settings/roles/delete/$roleB->id", [
'migrate_role_id' => $roleA->id,
]);
public function test_manage_user_permission()
{
- $this->actingAs($this->user)->get('/settings/users')
- ->seePageIs('/');
+ $this->actingAs($this->user)->get('/settings/users')->assertRedirect('/');
$this->giveUserPermissions($this->user, ['users-manage']);
- $this->actingAs($this->user)->get('/settings/users')
- ->seePageIs('/settings/users');
+ $this->actingAs($this->user)->get('/settings/users')->assertOk();
}
public function test_manage_users_permission_shows_link_in_header_if_does_not_have_settings_manage_permision()
public function test_user_roles_manage_permission()
{
- $this->actingAs($this->user)->get('/settings/roles')
- ->seePageIs('/')->get('/settings/roles/1')->seePageIs('/');
+ $this->actingAs($this->user)->get('/settings/roles')->assertRedirect('/');
+ $this->get('/settings/roles/1')->assertRedirect('/');
$this->giveUserPermissions($this->user, ['user-roles-manage']);
- $this->actingAs($this->user)->get('/settings/roles')
- ->seePageIs('/settings/roles')->click('Admin')
- ->assertSee('Edit Role');
+ $this->actingAs($this->user)->get('/settings/roles')->assertOk();
+ $this->get('/settings/roles/1')
+ ->assertOk()
+ ->assertSee('Admin');
}
public function test_settings_manage_permission()
{
- $this->actingAs($this->user)->get('/settings')
- ->seePageIs('/');
+ $this->actingAs($this->user)->get('/settings')->assertRedirect('/');
$this->giveUserPermissions($this->user, ['settings-manage']);
- $this->actingAs($this->user)->get('/settings')
- ->seePageIs('/settings')->press('Save Settings')->assertSee('Settings Saved');
+ $this->get('/settings')->assertOk();
+
+ $resp = $this->post('/settings', []);
+ $resp->assertRedirect('/settings');
+ $resp = $this->get('/settings');
+ $resp->assertSee('Settings saved');
}
public function test_restrictions_manage_all_permission()
{
- $page = Page::take(1)->get()->first();
- $this->actingAs($this->user)->get($page->getUrl())
- ->assertDontSee('Permissions')
- ->get($page->getUrl() . '/permissions')
- ->seePageIs('/');
+ $page = Page::query()->get()->first();
+
+ $this->actingAs($this->user)->get($page->getUrl())->assertDontSee('Permissions');
+ $this->get($page->getUrl('/permissions'))->assertRedirect('/');
+
$this->giveUserPermissions($this->user, ['restrictions-manage-all']);
- $this->actingAs($this->user)->get($page->getUrl())
- ->assertSee('Permissions')
- ->click('Permissions')
- ->assertSee('Page Permissions')->seePageIs($page->getUrl() . '/permissions');
+
+ $this->actingAs($this->user)->get($page->getUrl())->assertSee('Permissions');
+
+ $this->get($page->getUrl('/permissions'))
+ ->assertOk()
+ ->assertSee('Page Permissions');
}
public function test_restrictions_manage_own_permission()
$page->save();
// Check can't restrict other's content
- $this->actingAs($this->user)->get($otherUsersPage->getUrl())
- ->assertDontSee('Permissions')
- ->get($otherUsersPage->getUrl() . '/permissions')
- ->seePageIs('/');
+ $this->actingAs($this->user)->get($otherUsersPage->getUrl())->assertDontSee('Permissions');
+ $this->get($otherUsersPage->getUrl('/permissions'))->assertRedirect('/');
+
// Check can't restrict own content
- $this->actingAs($this->user)->get($page->getUrl())
- ->assertDontSee('Permissions')
- ->get($page->getUrl() . '/permissions')
- ->seePageIs('/');
+ $this->actingAs($this->user)->get($page->getUrl())->assertDontSee('Permissions');
+ $this->get($page->getUrl('/permissions'))->assertRedirect('/');
$this->giveUserPermissions($this->user, ['restrictions-manage-own']);
// Check can't restrict other's content
- $this->actingAs($this->user)->get($otherUsersPage->getUrl())
- ->assertDontSee('Permissions')
- ->get($otherUsersPage->getUrl() . '/permissions')
- ->seePageIs('/');
+ $this->actingAs($this->user)->get($otherUsersPage->getUrl())->assertDontSee('Permissions');
+ $this->get($otherUsersPage->getUrl('/permissions'))->assertRedirect();
+
// Check can restrict own content
- $this->actingAs($this->user)->get($page->getUrl())
- ->assertSee('Permissions')
- ->click('Permissions')
- ->seePageIs($page->getUrl() . '/permissions');
+ $this->actingAs($this->user)->get($page->getUrl())->assertSee('Permissions');
+ $this->get($page->getUrl('/permissions'))->assertOk();
}
/**
* Check a standard entity access permission.
- *
- * @param string $permission
- * @param array $accessUrls Urls that are only accessible after having the permission
- * @param array $visibles Check this text, In the buttons toolbar, is only visible with the permission
*/
- private function checkAccessPermission($permission, $accessUrls = [], $visibles = [])
+ private function checkAccessPermission(string $permission, array $accessUrls = [], array $visibles = [])
{
foreach ($accessUrls as $url) {
- $this->actingAs($this->user)->get($url)
- ->seePageIs('/');
+ $this->actingAs($this->user)->get($url)->assertRedirect('/');
}
+
foreach ($visibles as $url => $text) {
$this->actingAs($this->user)->get($url)
->assertElementNotContains('.action-buttons', $text);
$this->giveUserPermissions($this->user, [$permission]);
foreach ($accessUrls as $url) {
- $this->actingAs($this->user)->get($url)
- ->seePageIs($url);
+ $this->actingAs($this->user)->get($url)->assertOk();
}
foreach ($visibles as $url => $text) {
- $this->actingAs($this->user)->get($url)
- ->assertSee($text);
+ $this->actingAs($this->user)->get($url)->assertSee($text);
}
}
'/shelves' => 'New Shelf',
]);
- $this->get('/create-shelf')
- ->type('test shelf', 'name')
- ->type('shelf desc', 'description')
- ->press('Save Shelf')
- ->seePageIs('/shelves/test-shelf');
+ $this->post('/shelves', [
+ 'name' => 'test shelf',
+ 'description' => 'shelf desc',
+ ])->assertRedirect('/shelves/test-shelf');
}
public function test_bookshelves_edit_own_permission()
$ownShelf->getUrl() => 'Edit',
]);
- $this->get($otherShelf->getUrl())
- ->assertElementNotContains('.action-buttons', 'Edit')
- ->get($otherShelf->getUrl('/edit'))
- ->seePageIs('/');
+ $this->get($otherShelf->getUrl())->assertElementNotContains('.action-buttons', 'Edit');
+ $this->get($otherShelf->getUrl('/edit'))->assertRedirect('/');
}
public function test_bookshelves_edit_all_permission()
$ownShelf->getUrl() => 'Delete',
]);
- $this->get($otherShelf->getUrl())
- ->assertElementNotContains('.action-buttons', 'Delete')
- ->get($otherShelf->getUrl('/delete'))
- ->seePageIs('/');
- $this->get($ownShelf->getUrl())->get($ownShelf->getUrl('/delete'))
- ->press('Confirm')
- ->seePageIs('/shelves')
- ->assertDontSee($ownShelf->name);
+ $this->get($otherShelf->getUrl())->assertElementNotContains('.action-buttons', 'Delete');
+ $this->get($otherShelf->getUrl('/delete'))->assertRedirect('/');
+
+ $this->get($ownShelf->getUrl());
+ $this->delete($ownShelf->getUrl())->assertRedirect('/shelves');
+ $this->get('/shelves')->assertDontSee($ownShelf->name);
}
public function test_bookshelves_delete_all_permission()
$otherShelf->getUrl() => 'Delete',
]);
- $this->get($otherShelf->getUrl())->get($otherShelf->getUrl('/delete'))
- ->press('Confirm')
- ->seePageIs('/shelves')
- ->assertDontSee($otherShelf->name);
+ $this->delete($otherShelf->getUrl())->assertRedirect('/shelves');
+ $this->get('/shelves')->assertDontSee($otherShelf->name);
}
public function test_books_create_all_permissions()
'/books' => 'Create New Book',
]);
- $this->get('/create-book')
- ->type('test book', 'name')
- ->type('book desc', 'description')
- ->press('Save Book')
- ->seePageIs('/books/test-book');
+ $this->post('/books', [
+ 'name' => 'test book',
+ 'description' => 'book desc',
+ ])->assertRedirect('/books/test-book');
}
public function test_books_edit_own_permission()
$ownBook->getUrl() => 'Edit',
]);
- $this->get($otherBook->getUrl())
- ->assertElementNotContains('.action-buttons', 'Edit')
- ->get($otherBook->getUrl() . '/edit')
- ->seePageIs('/');
+ $this->get($otherBook->getUrl())->assertElementNotContains('.action-buttons', 'Edit');
+ $this->get($otherBook->getUrl('/edit'))->assertRedirect('/');
}
public function test_books_edit_all_permission()
$ownBook->getUrl() => 'Delete',
]);
- $this->get($otherBook->getUrl())
- ->assertElementNotContains('.action-buttons', 'Delete')
- ->get($otherBook->getUrl() . '/delete')
- ->seePageIs('/');
- $this->get($ownBook->getUrl())->get($ownBook->getUrl() . '/delete')
- ->press('Confirm')
- ->seePageIs('/books')
- ->assertDontSee($ownBook->name);
+ $this->get($otherBook->getUrl())->assertElementNotContains('.action-buttons', 'Delete');
+ $this->get($otherBook->getUrl('/delete'))->assertRedirect('/');
+ $this->get($ownBook->getUrl());
+ $this->delete($ownBook->getUrl())->assertRedirect('/books');
+ $this->get('/books')->assertDontSee($ownBook->name);
}
public function test_books_delete_all_permission()
$otherBook->getUrl() => 'Delete',
]);
- $this->get($otherBook->getUrl())->get($otherBook->getUrl() . '/delete')
- ->press('Confirm')
- ->seePageIs('/books')
- ->assertDontSee($otherBook->name);
+ $this->get($otherBook->getUrl());
+ $this->delete($otherBook->getUrl())->assertRedirect('/books');
+ $this->get('/books')->assertDontSee($otherBook->name);
}
public function test_chapter_create_own_permissions()
$ownBook->getUrl() => 'New Chapter',
]);
- $this->get($ownBook->getUrl('/create-chapter'))
- ->type('test chapter', 'name')
- ->type('chapter desc', 'description')
- ->press('Save Chapter')
- ->seePageIs($ownBook->getUrl('/chapter/test-chapter'));
+ $this->post($ownBook->getUrl('/create-chapter'), [
+ 'name' => 'test chapter',
+ 'description' => 'chapter desc',
+ ])->assertRedirect($ownBook->getUrl('/chapter/test-chapter'));
- $this->get($book->getUrl())
- ->assertElementNotContains('.action-buttons', 'New Chapter')
- ->get($book->getUrl('/create-chapter'))
- ->seePageIs('/');
+ $this->get($book->getUrl())->assertElementNotContains('.action-buttons', 'New Chapter');
+ $this->get($book->getUrl('/create-chapter'))->assertRedirect('/');
}
public function test_chapter_create_all_permissions()
{
- $book = Book::take(1)->get()->first();
+ /** @var Book $book */
+ $book = Book::query()->first();
$this->checkAccessPermission('chapter-create-all', [
$book->getUrl('/create-chapter'),
], [
$book->getUrl() => 'New Chapter',
]);
- $this->get($book->getUrl('/create-chapter'))
- ->type('test chapter', 'name')
- ->type('chapter desc', 'description')
- ->press('Save Chapter')
- ->seePageIs($book->getUrl('/chapter/test-chapter'));
+ $this->post($book->getUrl('/create-chapter'), [
+ 'name' => 'test chapter',
+ 'description' => 'chapter desc',
+ ])->assertRedirect($book->getUrl('/chapter/test-chapter'));
}
public function test_chapter_edit_own_permission()
{
- $otherChapter = Chapter::take(1)->get()->first();
+ /** @var Chapter $otherChapter */
+ $otherChapter = Chapter::query()->first();
$ownChapter = $this->createEntityChainBelongingToUser($this->user)['chapter'];
$this->checkAccessPermission('chapter-update-own', [
$ownChapter->getUrl() . '/edit',
$ownChapter->getUrl() => 'Edit',
]);
- $this->get($otherChapter->getUrl())
- ->assertElementNotContains('.action-buttons', 'Edit')
- ->get($otherChapter->getUrl() . '/edit')
- ->seePageIs('/');
+ $this->get($otherChapter->getUrl())->assertElementNotContains('.action-buttons', 'Edit');
+ $this->get($otherChapter->getUrl('/edit'))->assertRedirect('/');
}
public function test_chapter_edit_all_permission()
{
$this->giveUserPermissions($this->user, ['chapter-update-all']);
/** @var Chapter $otherChapter */
- $otherChapter = Chapter::query()->take(1)->get()->first();
+ $otherChapter = Chapter::query()->first();
$ownChapter = $this->createEntityChainBelongingToUser($this->user)['chapter'];
$this->checkAccessPermission('chapter-delete-own', [
$ownChapter->getUrl() . '/delete',
]);
$bookUrl = $ownChapter->book->getUrl();
- $this->get($otherChapter->getUrl())
- ->assertElementNotContains('.action-buttons', 'Delete')
- ->get($otherChapter->getUrl() . '/delete')
- ->seePageIs('/');
- $this->get($ownChapter->getUrl())->get($ownChapter->getUrl() . '/delete')
- ->press('Confirm')
- ->seePageIs($bookUrl)
- ->assertElementNotContains('.book-content', $ownChapter->name);
+ $this->get($otherChapter->getUrl())->assertElementNotContains('.action-buttons', 'Delete');
+ $this->get($otherChapter->getUrl('/delete'))->assertRedirect('/');
+ $this->get($ownChapter->getUrl());
+ $this->delete($ownChapter->getUrl())->assertRedirect($bookUrl);
+ $this->get($bookUrl)->assertElementNotContains('.book-content', $ownChapter->name);
}
public function test_chapter_delete_all_permission()
{
$this->giveUserPermissions($this->user, ['chapter-update-all']);
- $otherChapter = Chapter::take(1)->get()->first();
+ /** @var Chapter $otherChapter */
+ $otherChapter = Chapter::query()->first();
$this->checkAccessPermission('chapter-delete-all', [
$otherChapter->getUrl() . '/delete',
], [
]);
$bookUrl = $otherChapter->book->getUrl();
- $this->get($otherChapter->getUrl())->get($otherChapter->getUrl() . '/delete')
- ->press('Confirm')
- ->seePageIs($bookUrl)
- ->assertElementNotContains('.book-content', $otherChapter->name);
+ $this->get($otherChapter->getUrl());
+ $this->delete($otherChapter->getUrl())->assertRedirect($bookUrl);
+ $this->get($bookUrl)->assertElementNotContains('.book-content', $otherChapter->name);
}
public function test_page_create_own_permissions()
$accessUrls = [$createUrl, $createUrlChapter];
foreach ($accessUrls as $url) {
- $this->actingAs($this->user)->get($url)
- ->seePageIs('/');
+ $this->actingAs($this->user)->get($url)->assertRedirect('/');
}
$this->checkAccessPermission('page-create-own', [], [
$this->giveUserPermissions($this->user, ['page-create-own']);
foreach ($accessUrls as $index => $url) {
- $this->actingAs($this->user)->get($url);
- $expectedUrl = Page::where('draft', '=', true)->orderBy('id', 'desc')->first()->getUrl();
- $this->seePageIs($expectedUrl);
+ $resp = $this->actingAs($this->user)->get($url);
+ $expectedUrl = Page::query()->where('draft', '=', true)->orderBy('id', 'desc')->first()->getUrl();
+ $resp->assertRedirect($expectedUrl);
}
- $this->get($createUrl)
- ->type('test page', 'name')
- ->type('page desc', 'html')
- ->press('Save Page')
- ->seePageIs($ownBook->getUrl('/page/test-page'));
+ $this->get($createUrl);
+ /** @var Page $draft */
+ $draft = Page::query()->where('draft', '=', true)->orderBy('id', 'desc')->first();
+ $this->post($draft->getUrl(), [
+ 'name' => 'test page',
+ 'html' => 'page desc',
+ ])->assertRedirect($ownBook->getUrl('/page/test-page'));
- $this->get($book->getUrl())
- ->assertElementNotContains('.action-buttons', 'New Page')
- ->get($book->getUrl() . '/create-page')
- ->seePageIs('/');
- $this->get($chapter->getUrl())
- ->assertElementNotContains('.action-buttons', 'New Page')
- ->get($chapter->getUrl() . '/create-page')
- ->seePageIs('/');
+ $this->get($book->getUrl())->assertElementNotContains('.action-buttons', 'New Page');
+ $this->get($book->getUrl('/create-page'))->assertRedirect('/');
+
+ $this->get($chapter->getUrl())->assertElementNotContains('.action-buttons', 'New Page');
+ $this->get($chapter->getUrl('/create-page'))->assertRedirect('/');
}
public function test_page_create_all_permissions()
{
- $book = Book::take(1)->get()->first();
- $chapter = Chapter::take(1)->get()->first();
+ /** @var Book $book */
+ $book = Book::query()->first();
+ /** @var Chapter $chapter */
+ $chapter = Chapter::query()->first();
$createUrl = $book->getUrl('/create-page');
$createUrlChapter = $chapter->getUrl('/create-page');
$accessUrls = [$createUrl, $createUrlChapter];
foreach ($accessUrls as $url) {
- $this->actingAs($this->user)->get($url)
- ->seePageIs('/');
+ $this->actingAs($this->user)->get($url)->assertRedirect('/');
}
$this->checkAccessPermission('page-create-all', [], [
$this->giveUserPermissions($this->user, ['page-create-all']);
foreach ($accessUrls as $index => $url) {
- $this->actingAs($this->user)->get($url);
- $expectedUrl = Page::where('draft', '=', true)->orderBy('id', 'desc')->first()->getUrl();
- $this->seePageIs($expectedUrl);
+ $resp = $this->actingAs($this->user)->get($url);
+ $expectedUrl = Page::query()->where('draft', '=', true)->orderBy('id', 'desc')->first()->getUrl();
+ $resp->assertRedirect($expectedUrl);
}
- $this->get($createUrl)
- ->type('test page', 'name')
- ->type('page desc', 'html')
- ->press('Save Page')
- ->seePageIs($book->getUrl('/page/test-page'));
+ $this->get($createUrl);
+ /** @var Page $draft */
+ $draft = Page::query()->where('draft', '=', true)->orderByDesc('id')->first();
+ $this->post($draft->getUrl(), [
+ 'name' => 'test page',
+ 'html' => 'page desc',
+ ])->assertRedirect($book->getUrl('/page/test-page'));
- $this->get($chapter->getUrl('/create-page'))
- ->type('new test page', 'name')
- ->type('page desc', 'html')
- ->press('Save Page')
- ->seePageIs($book->getUrl('/page/new-test-page'));
+ $this->get($chapter->getUrl('/create-page'));
+ /** @var Page $draft */
+ $draft = Page::query()->where('draft', '=', true)->orderByDesc('id')->first();
+ $this->post($draft->getUrl(), [
+ 'name' => 'new test page',
+ 'html' => 'page desc',
+ ])->assertRedirect($book->getUrl('/page/new-test-page'));
}
public function test_page_edit_own_permission()
{
- $otherPage = Page::take(1)->get()->first();
+ /** @var Page $otherPage */
+ $otherPage = Page::query()->first();
$ownPage = $this->createEntityChainBelongingToUser($this->user)['page'];
$this->checkAccessPermission('page-update-own', [
$ownPage->getUrl() . '/edit',
$ownPage->getUrl() => 'Edit',
]);
- $this->get($otherPage->getUrl())
- ->assertElementNotContains('.action-buttons', 'Edit')
- ->get($otherPage->getUrl() . '/edit')
- ->seePageIs('/');
+ $this->get($otherPage->getUrl())->assertElementNotContains('.action-buttons', 'Edit');
+ $this->get($otherPage->getUrl() . '/edit')->assertRedirect('/');
}
public function test_page_edit_all_permission()
{
- $otherPage = Page::take(1)->get()->first();
+ /** @var Page $otherPage */
+ $otherPage = Page::query()->first();
$this->checkAccessPermission('page-update-all', [
- $otherPage->getUrl() . '/edit',
+ $otherPage->getUrl('/edit'),
], [
$otherPage->getUrl() => 'Edit',
]);
public function test_page_delete_own_permission()
{
$this->giveUserPermissions($this->user, ['page-update-all']);
- $otherPage = Page::take(1)->get()->first();
+ /** @var Page $otherPage */
+ $otherPage = Page::query()->first();
$ownPage = $this->createEntityChainBelongingToUser($this->user)['page'];
$this->checkAccessPermission('page-delete-own', [
$ownPage->getUrl() . '/delete',
]);
$parent = $ownPage->chapter ?? $ownPage->book;
- $this->get($otherPage->getUrl())
- ->assertElementNotContains('.action-buttons', 'Delete')
- ->get($otherPage->getUrl() . '/delete')
- ->seePageIs('/');
- $this->get($ownPage->getUrl())->get($ownPage->getUrl() . '/delete')
- ->press('Confirm')
- ->seePageIs($parent->getUrl())
- ->assertElementNotContains('.book-content', $ownPage->name);
+ $this->get($otherPage->getUrl())->assertElementNotContains('.action-buttons', 'Delete');
+ $this->get($otherPage->getUrl('/delete'))->assertRedirect('/');
+ $this->get($ownPage->getUrl());
+ $this->delete($ownPage->getUrl())->assertRedirect($parent->getUrl());
+ $this->get($parent->getUrl())->assertElementNotContains('.book-content', $ownPage->name);
}
public function test_page_delete_all_permission()
{
$this->giveUserPermissions($this->user, ['page-update-all']);
- $otherPage = Page::take(1)->get()->first();
+ /** @var Page $otherPage */
+ $otherPage = Page::query()->first();
+
$this->checkAccessPermission('page-delete-all', [
$otherPage->getUrl() . '/delete',
], [
$otherPage->getUrl() => 'Delete',
]);
+ /** @var Entity $parent */
$parent = $otherPage->chapter ?? $otherPage->book;
- $this->get($otherPage->getUrl())->get($otherPage->getUrl() . '/delete')
- ->press('Confirm')
- ->seePageIs($parent->getUrl())
- ->assertElementNotContains('.book-content', $otherPage->name);
+ $this->get($otherPage->getUrl());
+
+ $this->delete($otherPage->getUrl())->assertRedirect($parent->getUrl());
+ $this->get($parent->getUrl())->assertDontSee($otherPage->name);
}
public function test_public_role_visible_in_user_edit_screen()
{
- $user = User::first();
+ /** @var User $user */
+ $user = User::query()->first();
$adminRole = Role::getSystemRole('admin');
$publicRole = Role::getSystemRole('public');
$this->asAdmin()->get('/settings/users/' . $user->id)
->assertElementExists('[data-system-role-name="public"]');
}
- public function test_public_role_not_deleteable()
+ public function test_public_role_not_deletable()
{
- $this->asAdmin()->get('/settings/roles')
- ->click('Public')
- ->assertSee('Edit Role')
- ->click('Delete Role')
- ->press('Confirm')
- ->assertSee('Delete Role')
- ->assertSee('Cannot be deleted');
+ /** @var Role $publicRole */
+ $publicRole = Role::getSystemRole('public');
+ $resp = $this->asAdmin()->delete('/settings/roles/delete/' . $publicRole->id);
+ $resp->assertRedirect('/');
+
+ $this->get('/settings/roles/delete/' . $publicRole->id);
+ $resp = $this->delete('/settings/roles/delete/' . $publicRole->id);
+ $resp->assertRedirect('/settings/roles/delete/' . $publicRole->id);
+ $resp = $this->get('/settings/roles/delete/' . $publicRole->id);
+ $resp->assertSee('This role is a system role and cannot be deleted');
}
public function test_image_delete_own_permission()
{
$this->giveUserPermissions($this->user, ['image-update-all']);
- $page = Page::first();
- $image = factory(Image::class)->create(['uploaded_to' => $page->id, 'created_by' => $this->user->id, 'updated_by' => $this->user->id]);
+ /** @var Page $page */
+ $page = Page::query()->first();
+ $image = factory(Image::class)->create([
+ 'uploaded_to' => $page->id,
+ 'created_by' => $this->user->id,
+ 'updated_by' => $this->user->id,
+ ]);
- $this->actingAs($this->user)->json('delete', '/images/' . $image->id)
- ->assertStatus(403);
+ $this->actingAs($this->user)->json('delete', '/images/' . $image->id)->assertStatus(403);
$this->giveUserPermissions($this->user, ['image-delete-own']);
- $this->actingAs($this->user)->json('delete', '/images/' . $image->id)
- ->assertOk()
- ->assertDatabaseMissing('images', ['id' => $image->id]);
+ $this->actingAs($this->user)->json('delete', '/images/' . $image->id)->assertOk();
+ $this->assertDatabaseMissing('images', ['id' => $image->id]);
}
public function test_image_delete_all_permission()
{
$this->giveUserPermissions($this->user, ['image-update-all']);
$admin = $this->getAdmin();
- $page = Page::first();
+ /** @var Page $page */
+ $page = Page::query()->first();
$image = factory(Image::class)->create(['uploaded_to' => $page->id, 'created_by' => $admin->id, 'updated_by' => $admin->id]);
- $this->actingAs($this->user)->json('delete', '/images/' . $image->id)
- ->assertStatus(403);
+ $this->actingAs($this->user)->json('delete', '/images/' . $image->id)->assertStatus(403);
$this->giveUserPermissions($this->user, ['image-delete-own']);
- $this->actingAs($this->user)->json('delete', '/images/' . $image->id)
- ->assertStatus(403);
+ $this->actingAs($this->user)->json('delete', '/images/' . $image->id)->assertStatus(403);
$this->giveUserPermissions($this->user, ['image-delete-all']);
- $this->actingAs($this->user)->json('delete', '/images/' . $image->id)
- ->assertOk()
- ->assertDatabaseMissing('images', ['id' => $image->id]);
+ $this->actingAs($this->user)->json('delete', '/images/' . $image->id)->assertOk();
+ $this->assertDatabaseMissing('images', ['id' => $image->id]);
}
public function test_role_permission_removal()