From 6023eb3c8fabc0e2e9a81faf832ca92c3bc41ae0 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Sat, 1 Apr 2017 14:00:59 -0400 Subject: [PATCH] 92 - Dealing with Out of Sync Mocks --- app/Ticket.php | 2 +- composer.json | 2 +- composer.lock | 398 ++++++++++++++++++++------------------ tests/TestCase.php | 6 + tests/unit/TicketTest.php | 2 +- 5 files changed, 218 insertions(+), 192 deletions(-) diff --git a/app/Ticket.php b/app/Ticket.php index d6a76a3..31ffc85 100644 --- a/app/Ticket.php +++ b/app/Ticket.php @@ -27,7 +27,7 @@ class Ticket extends Model public function claimFor($order) { - $this->code = TicketCode::generate(); + $this->code = TicketCode::generateFor($this); $order->tickets()->save($this); } diff --git a/composer.json b/composer.json index 823ade6..bd58dc2 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ }, "require-dev": { "fzaninotto/faker": "~1.4", - "mockery/mockery": "0.9.*", + "mockery/mockery": "1.0.0-alpha1", "phpunit/phpunit": "~5.0", "symfony/css-selector": "3.1.*", "symfony/dom-crawler": "3.1.*", diff --git a/composer.lock b/composer.lock index 6c4b415..13c366a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "db1b9a3f2f70305f0dfb091c649c5244", - "content-hash": "c06ac106d86b5ff3a64062d333400438", + "hash": "94fd2c7211ef4aa80724947e13ba4651", + "content-hash": "caee9b77188f151d418e434e7e9e9f21", "packages": [ { "name": "doctrine/inflector", @@ -76,16 +76,16 @@ }, { "name": "erusev/parsedown", - "version": "1.6.1", + "version": "1.6.2", "source": { "type": "git", "url": "https://github.com/erusev/parsedown.git", - "reference": "20ff8bbb57205368b4b42d094642a3e52dac85fb" + "reference": "1bf24f7334fe16c88bf9d467863309ceaf285b01" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/20ff8bbb57205368b4b42d094642a3e52dac85fb", - "reference": "20ff8bbb57205368b4b42d094642a3e52dac85fb", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/1bf24f7334fe16c88bf9d467863309ceaf285b01", + "reference": "1bf24f7334fe16c88bf9d467863309ceaf285b01", "shasum": "" }, "require": { @@ -114,25 +114,25 @@ "markdown", "parser" ], - "time": "2016-11-02 15:56:58" + "time": "2017-03-29 16:04:15" }, { "name": "guzzlehttp/guzzle", - "version": "6.2.2", + "version": "6.2.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60" + "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ebf29dee597f02f09f4d5bbecc68230ea9b08f60", - "reference": "ebf29dee597f02f09f4d5bbecc68230ea9b08f60", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/8d6c6cc55186db87b7dc5009827429ba4e9dc006", + "reference": "8d6c6cc55186db87b7dc5009827429ba4e9dc006", "shasum": "" }, "require": { "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.3.1", + "guzzlehttp/psr7": "^1.4", "php": ">=5.5" }, "require-dev": { @@ -176,7 +176,7 @@ "rest", "web service" ], - "time": "2016-10-08 15:01:37" + "time": "2017-02-28 22:50:30" }, { "name": "guzzlehttp/promises", @@ -231,16 +231,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.3.1", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b" + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", - "reference": "5c6447c9df362e8f8093bda8f5d8873fe5c7f65b", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", "shasum": "" }, "require": { @@ -276,16 +276,23 @@ "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" } ], - "description": "PSR-7 message implementation", + "description": "PSR-7 message implementation that also provides common utility methods", "keywords": [ "http", "message", + "request", + "response", "stream", - "uri" + "uri", + "url" ], - "time": "2016-06-24 23:00:38" + "time": "2017-03-20 17:10:46" }, { "name": "hashids/hashids", @@ -352,16 +359,16 @@ }, { "name": "laravel/framework", - "version": "v5.4.8", + "version": "v5.4.16", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "3e226e3481aabe835626739a1507c8af17b76082" + "reference": "6cf379ec34d08bcdc9c7183e369a8fdf04ade80d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/3e226e3481aabe835626739a1507c8af17b76082", - "reference": "3e226e3481aabe835626739a1507c8af17b76082", + "url": "https://api.github.com/repos/laravel/framework/zipball/6cf379ec34d08bcdc9c7183e369a8fdf04ade80d", + "reference": "6cf379ec34d08bcdc9c7183e369a8fdf04ade80d", "shasum": "" }, "require": { @@ -477,20 +484,20 @@ "framework", "laravel" ], - "time": "2017-02-01 14:45:01" + "time": "2017-03-21 19:34:41" }, { "name": "league/flysystem", - "version": "1.0.34", + "version": "1.0.37", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "469ad53c13ea19a0e54e3e5d70f61227ddcc0299" + "reference": "78b5cc4feb61a882302df4fbaf63b7662e5e4ccd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/469ad53c13ea19a0e54e3e5d70f61227ddcc0299", - "reference": "469ad53c13ea19a0e54e3e5d70f61227ddcc0299", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/78b5cc4feb61a882302df4fbaf63b7662e5e4ccd", + "reference": "78b5cc4feb61a882302df4fbaf63b7662e5e4ccd", "shasum": "" }, "require": { @@ -560,20 +567,20 @@ "sftp", "storage" ], - "time": "2017-01-30 17:41:17" + "time": "2017-03-22 15:43:14" }, { "name": "monolog/monolog", - "version": "1.22.0", + "version": "1.22.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "bad29cb8d18ab0315e6c477751418a82c850d558" + "reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bad29cb8d18ab0315e6c477751418a82c850d558", - "reference": "bad29cb8d18ab0315e6c477751418a82c850d558", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1e044bc4b34e91743943479f1be7a1d5eb93add0", + "reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0", "shasum": "" }, "require": { @@ -638,7 +645,7 @@ "logging", "psr-3" ], - "time": "2016-11-26 00:15:39" + "time": "2017-03-13 07:08:03" }, { "name": "mtdowling/cron-expression", @@ -782,16 +789,16 @@ }, { "name": "paragonie/random_compat", - "version": "v2.0.4", + "version": "v2.0.10", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e" + "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e", - "reference": "a9b97968bcde1c4de2a5ec6cbd06a0f6c919b46e", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", "shasum": "" }, "require": { @@ -826,7 +833,7 @@ "pseudorandom", "random" ], - "time": "2016-11-07 23:38:38" + "time": "2017-03-13 16:27:32" }, { "name": "psr/http-message", @@ -927,30 +934,30 @@ }, { "name": "ramsey/uuid", - "version": "3.5.2", + "version": "3.6.1", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "5677cfe02397dd6b58c861870dfaa5d9007d3954" + "reference": "4ae32dd9ab8860a4bbd750ad269cba7f06f7934e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/5677cfe02397dd6b58c861870dfaa5d9007d3954", - "reference": "5677cfe02397dd6b58c861870dfaa5d9007d3954", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/4ae32dd9ab8860a4bbd750ad269cba7f06f7934e", + "reference": "4ae32dd9ab8860a4bbd750ad269cba7f06f7934e", "shasum": "" }, "require": { "paragonie/random_compat": "^1.0|^2.0", - "php": ">=5.4" + "php": "^5.4 || ^7.0" }, "replace": { "rhumsaa/uuid": "self.version" }, "require-dev": { "apigen/apigen": "^4.1", - "codeception/aspect-mock": "1.0.0", + "codeception/aspect-mock": "^1.0 | ^2.0", "doctrine/annotations": "~1.2.0", - "goaop/framework": "1.0.0-alpha.2", + "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ^2.1", "ircmaxell/random-lib": "^1.1", "jakub-onderka/php-parallel-lint": "^0.9.0", "mockery/mockery": "^0.9.4", @@ -1005,20 +1012,20 @@ "identifier", "uuid" ], - "time": "2016-11-22 19:21:44" + "time": "2017-03-26 20:37:53" }, { "name": "stripe/stripe-php", - "version": "v4.4.0", + "version": "v4.5.1", "source": { "type": "git", "url": "https://github.com/stripe/stripe-php.git", - "reference": "9ec772fe502995850954dbc15b1f38e6f9159a4d" + "reference": "420d34ae71059700ea2a2e466670f66ddd97777d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stripe/stripe-php/zipball/9ec772fe502995850954dbc15b1f38e6f9159a4d", - "reference": "9ec772fe502995850954dbc15b1f38e6f9159a4d", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/420d34ae71059700ea2a2e466670f66ddd97777d", + "reference": "420d34ae71059700ea2a2e466670f66ddd97777d", "shasum": "" }, "require": { @@ -1060,20 +1067,20 @@ "payment processing", "stripe" ], - "time": "2017-01-18 18:55:45" + "time": "2017-03-22 17:51:32" }, { "name": "swiftmailer/swiftmailer", - "version": "v5.4.5", + "version": "v5.4.6", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "cd142238a339459b10da3d8234220963f392540c" + "reference": "81fdccfaf8bdc5d5d7a1ef6bb3a61bbb1a6c4a3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/cd142238a339459b10da3d8234220963f392540c", - "reference": "cd142238a339459b10da3d8234220963f392540c", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/81fdccfaf8bdc5d5d7a1ef6bb3a61bbb1a6c4a3e", + "reference": "81fdccfaf8bdc5d5d7a1ef6bb3a61bbb1a6c4a3e", "shasum": "" }, "require": { @@ -1114,20 +1121,20 @@ "mail", "mailer" ], - "time": "2016-12-29 10:02:40" + "time": "2017-02-13 07:52:53" }, { "name": "symfony/console", - "version": "v3.2.2", + "version": "v3.2.6", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "4f9e449e76996adf310498a8ca955c6deebe29dd" + "reference": "28fb243a2b5727774ca309ec2d92da240f1af0dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/4f9e449e76996adf310498a8ca955c6deebe29dd", - "reference": "4f9e449e76996adf310498a8ca955c6deebe29dd", + "url": "https://api.github.com/repos/symfony/console/zipball/28fb243a2b5727774ca309ec2d92da240f1af0dd", + "reference": "28fb243a2b5727774ca309ec2d92da240f1af0dd", "shasum": "" }, "require": { @@ -1177,7 +1184,7 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-01-08 20:47:33" + "time": "2017-03-06 19:30:27" }, { "name": "symfony/css-selector", @@ -1234,16 +1241,16 @@ }, { "name": "symfony/debug", - "version": "v3.2.2", + "version": "v3.2.6", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "810ba5c1c5352a4ddb15d4719e8936751dff0b05" + "reference": "b90c9f91ad8ac37d9f114e369042d3226b34dc1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/810ba5c1c5352a4ddb15d4719e8936751dff0b05", - "reference": "810ba5c1c5352a4ddb15d4719e8936751dff0b05", + "url": "https://api.github.com/repos/symfony/debug/zipball/b90c9f91ad8ac37d9f114e369042d3226b34dc1a", + "reference": "b90c9f91ad8ac37d9f114e369042d3226b34dc1a", "shasum": "" }, "require": { @@ -1287,20 +1294,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-01-02 20:32:22" + "time": "2017-02-18 17:28:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.2.2", + "version": "v3.2.6", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "9137eb3a3328e413212826d63eeeb0217836e2b6" + "reference": "b7a1b9e0a0f623ce43b4c8d775eb138f190c9d8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9137eb3a3328e413212826d63eeeb0217836e2b6", - "reference": "9137eb3a3328e413212826d63eeeb0217836e2b6", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b7a1b9e0a0f623ce43b4c8d775eb138f190c9d8d", + "reference": "b7a1b9e0a0f623ce43b4c8d775eb138f190c9d8d", "shasum": "" }, "require": { @@ -1347,20 +1354,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2017-01-02 20:32:22" + "time": "2017-02-21 09:12:04" }, { "name": "symfony/finder", - "version": "v3.2.2", + "version": "v3.2.6", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "8c71141cae8e2957946b403cc71a67213c0380d6" + "reference": "92d7476d2df60cd851a3e13e078664b1deb8ce10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/8c71141cae8e2957946b403cc71a67213c0380d6", - "reference": "8c71141cae8e2957946b403cc71a67213c0380d6", + "url": "https://api.github.com/repos/symfony/finder/zipball/92d7476d2df60cd851a3e13e078664b1deb8ce10", + "reference": "92d7476d2df60cd851a3e13e078664b1deb8ce10", "shasum": "" }, "require": { @@ -1396,20 +1403,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-01-02 20:32:22" + "time": "2017-02-21 09:12:04" }, { "name": "symfony/http-foundation", - "version": "v3.2.2", + "version": "v3.2.6", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "33eb76bf1d833c705433e5361a646c164696394b" + "reference": "c57009887010eb4e58bfca2970314a5b820b24b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/33eb76bf1d833c705433e5361a646c164696394b", - "reference": "33eb76bf1d833c705433e5361a646c164696394b", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/c57009887010eb4e58bfca2970314a5b820b24b9", + "reference": "c57009887010eb4e58bfca2970314a5b820b24b9", "shasum": "" }, "require": { @@ -1449,20 +1456,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2017-01-08 20:47:33" + "time": "2017-03-04 12:23:14" }, { "name": "symfony/http-kernel", - "version": "v3.2.2", + "version": "v3.2.6", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "8a898e340a89022246645b1288d295f49c9381e4" + "reference": "bc909e85b8585c9edf043d0fca871308c41bb9b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/8a898e340a89022246645b1288d295f49c9381e4", - "reference": "8a898e340a89022246645b1288d295f49c9381e4", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/bc909e85b8585c9edf043d0fca871308c41bb9b4", + "reference": "bc909e85b8585c9edf043d0fca871308c41bb9b4", "shasum": "" }, "require": { @@ -1531,7 +1538,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2017-01-12 21:36:33" + "time": "2017-03-10 18:35:31" }, { "name": "symfony/polyfill-mbstring", @@ -1594,16 +1601,16 @@ }, { "name": "symfony/process", - "version": "v3.2.2", + "version": "v3.2.6", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "350e810019fc52dd06ae844b6a6d382f8a0e8893" + "reference": "68bfa8c83f24c0ac04ea7193bcdcda4519f41892" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/350e810019fc52dd06ae844b6a6d382f8a0e8893", - "reference": "350e810019fc52dd06ae844b6a6d382f8a0e8893", + "url": "https://api.github.com/repos/symfony/process/zipball/68bfa8c83f24c0ac04ea7193bcdcda4519f41892", + "reference": "68bfa8c83f24c0ac04ea7193bcdcda4519f41892", "shasum": "" }, "require": { @@ -1639,20 +1646,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2017-01-02 20:32:22" + "time": "2017-03-04 12:23:14" }, { "name": "symfony/routing", - "version": "v3.2.2", + "version": "v3.2.6", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "fda2c67d47ec801726ca888c95d701d31b27b444" + "reference": "d6605f9a5767bc5bc4895e1c762ba93964608aee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/fda2c67d47ec801726ca888c95d701d31b27b444", - "reference": "fda2c67d47ec801726ca888c95d701d31b27b444", + "url": "https://api.github.com/repos/symfony/routing/zipball/d6605f9a5767bc5bc4895e1c762ba93964608aee", + "reference": "d6605f9a5767bc5bc4895e1c762ba93964608aee", "shasum": "" }, "require": { @@ -1714,20 +1721,20 @@ "uri", "url" ], - "time": "2017-01-02 20:32:22" + "time": "2017-03-02 15:58:09" }, { "name": "symfony/translation", - "version": "v3.2.2", + "version": "v3.2.6", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "6520f3d4cce604d9dd1e86cac7af954984dd9bda" + "reference": "0e1b15ce8fbf3890f4ccdac430ed5e07fdfe0690" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/6520f3d4cce604d9dd1e86cac7af954984dd9bda", - "reference": "6520f3d4cce604d9dd1e86cac7af954984dd9bda", + "url": "https://api.github.com/repos/symfony/translation/zipball/0e1b15ce8fbf3890f4ccdac430ed5e07fdfe0690", + "reference": "0e1b15ce8fbf3890f4ccdac430ed5e07fdfe0690", "shasum": "" }, "require": { @@ -1740,7 +1747,7 @@ "require-dev": { "psr/log": "~1.0", "symfony/config": "~2.8|~3.0", - "symfony/intl": "~2.8|~3.0", + "symfony/intl": "^2.8.18|^3.2.5", "symfony/yaml": "~2.8|~3.0" }, "suggest": { @@ -1778,26 +1785,29 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2017-01-02 20:32:22" + "time": "2017-03-04 12:23:14" }, { "name": "symfony/var-dumper", - "version": "v3.2.2", + "version": "v3.2.6", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "b54b23f9a19b465e76fdaac0f6732410467c83b2" + "reference": "4100f347aff890bc16b0b4b42843b599db257b2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b54b23f9a19b465e76fdaac0f6732410467c83b2", - "reference": "b54b23f9a19b465e76fdaac0f6732410467c83b2", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/4100f347aff890bc16b0b4b42843b599db257b2d", + "reference": "4100f347aff890bc16b0b4b42843b599db257b2d", "shasum": "" }, "require": { "php": ">=5.5.9", "symfony/polyfill-mbstring": "~1.0" }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + }, "require-dev": { "twig/twig": "~1.20|~2.0" }, @@ -1841,7 +1851,7 @@ "debug", "dump" ], - "time": "2017-01-03 08:53:57" + "time": "2017-02-20 13:45:48" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -2119,20 +2129,20 @@ }, { "name": "hamcrest/hamcrest-php", - "version": "v1.2.2", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c" + "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/b37020aa976fa52d3de9aa904aa2522dc518f79c", - "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad", + "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "^5.3|^7.0" }, "replace": { "cordoval/hamcrest-php": "*", @@ -2141,15 +2151,18 @@ }, "require-dev": { "phpunit/php-file-iterator": "1.3.3", - "satooshi/php-coveralls": "dev-master" + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "^1.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "classmap": [ "hamcrest" - ], - "files": [ - "hamcrest/Hamcrest.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2160,7 +2173,7 @@ "keywords": [ "test" ], - "time": "2015-05-11 14:41:42" + "time": "2016-01-20 08:20:44" }, { "name": "jakub-onderka/php-console-color", @@ -2309,30 +2322,30 @@ }, { "name": "mockery/mockery", - "version": "0.9.9", + "version": "1.0.0-alpha1", "source": { "type": "git", "url": "https://github.com/padraic/mockery.git", - "reference": "6fdb61243844dc924071d3404bb23994ea0b6856" + "reference": "0b23f71799b3e43406f4ce7fef112ac3f0b7a385" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/padraic/mockery/zipball/6fdb61243844dc924071d3404bb23994ea0b6856", - "reference": "6fdb61243844dc924071d3404bb23994ea0b6856", + "url": "https://api.github.com/repos/padraic/mockery/zipball/0b23f71799b3e43406f4ce7fef112ac3f0b7a385", + "reference": "0b23f71799b3e43406f4ce7fef112ac3f0b7a385", "shasum": "" }, "require": { - "hamcrest/hamcrest-php": "~1.1", + "hamcrest/hamcrest-php": "~2.0", "lib-pcre": ">=7.0", - "php": ">=5.3.2" + "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~5.7" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.9.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { @@ -2370,7 +2383,7 @@ "test double", "testing" ], - "time": "2017-02-28 12:52:32" + "time": "2017-02-02 08:52:46" }, { "name": "myclabs/deep-copy", @@ -2613,27 +2626,27 @@ }, { "name": "phpspec/prophecy", - "version": "v1.6.2", + "version": "v1.7.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "6c52c2722f8460122f96f86346600e1077ce22cb" + "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb", - "reference": "6c52c2722f8460122f96f86346600e1077ce22cb", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", + "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1", - "sebastian/recursion-context": "^1.0|^2.0" + "sebastian/comparator": "^1.1|^2.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { - "phpspec/phpspec": "^2.0", + "phpspec/phpspec": "^2.5|^3.2", "phpunit/phpunit": "^4.8 || ^5.6.5" }, "type": "library", @@ -2672,39 +2685,39 @@ "spy", "stub" ], - "time": "2016-11-21 14:58:47" + "time": "2017-03-02 20:05:34" }, { "name": "phpunit/php-code-coverage", - "version": "4.0.5", + "version": "4.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "c19cfc7cbb0e9338d8c469c7eedecc2a428b0971" + "reference": "09e2277d14ea467e5a984010f501343ef29ffc69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c19cfc7cbb0e9338d8c469c7eedecc2a428b0971", - "reference": "c19cfc7cbb0e9338d8c469c7eedecc2a428b0971", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/09e2277d14ea467e5a984010f501343ef29ffc69", + "reference": "09e2277d14ea467e5a984010f501343ef29ffc69", "shasum": "" }, "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", "php": "^5.6 || ^7.0", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "^1.4.2", - "sebastian/code-unit-reverse-lookup": "~1.0", + "phpunit/php-file-iterator": "^1.3", + "phpunit/php-text-template": "^1.2", + "phpunit/php-token-stream": "^1.4.2 || ^2.0", + "sebastian/code-unit-reverse-lookup": "^1.0", "sebastian/environment": "^1.3.2 || ^2.0", - "sebastian/version": "~1.0|~2.0" + "sebastian/version": "^1.0 || ^2.0" }, "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "^5.4" + "ext-xdebug": "^2.1.4", + "phpunit/phpunit": "^5.7" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.4.0", - "ext-xmlwriter": "*" + "ext-xdebug": "^2.5.1" }, "type": "library", "extra": { @@ -2735,7 +2748,7 @@ "testing", "xunit" ], - "time": "2017-01-20 15:06:43" + "time": "2017-03-01 09:12:17" }, { "name": "phpunit/php-file-iterator", @@ -2827,25 +2840,30 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.8", + "version": "1.0.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4|~5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -2867,20 +2885,20 @@ "keywords": [ "timer" ], - "time": "2016-05-12 18:03:57" + "time": "2017-02-26 11:10:40" }, { "name": "phpunit/php-token-stream", - "version": "1.4.9", + "version": "1.4.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b" + "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b", - "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", + "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", "shasum": "" }, "require": { @@ -2916,20 +2934,20 @@ "keywords": [ "tokenizer" ], - "time": "2016-11-15 14:06:22" + "time": "2017-02-27 10:12:30" }, { "name": "phpunit/phpunit", - "version": "5.7.9", + "version": "5.7.17", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "69f832b87c731d5cacad7f91948778fe98335fdd" + "reference": "68752b665d3875f9a38a357e3ecb35c79f8673bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/69f832b87c731d5cacad7f91948778fe98335fdd", - "reference": "69f832b87c731d5cacad7f91948778fe98335fdd", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/68752b665d3875f9a38a357e3ecb35c79f8673bf", + "reference": "68752b665d3875f9a38a357e3ecb35c79f8673bf", "shasum": "" }, "require": { @@ -2946,14 +2964,14 @@ "phpunit/php-text-template": "~1.2", "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "^3.2", - "sebastian/comparator": "~1.2.2", + "sebastian/comparator": "^1.2.4", "sebastian/diff": "~1.2", "sebastian/environment": "^1.3.4 || ^2.0", "sebastian/exporter": "~2.0", - "sebastian/global-state": "^1.0 || ^2.0", + "sebastian/global-state": "^1.1", "sebastian/object-enumerator": "~2.0", "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0|~2.0", + "sebastian/version": "~1.0.3|~2.0", "symfony/yaml": "~2.1|~3.0" }, "conflict": { @@ -2998,7 +3016,7 @@ "testing", "xunit" ], - "time": "2017-01-28 06:14:33" + "time": "2017-03-19 16:52:12" }, { "name": "phpunit/phpunit-mock-objects", @@ -3134,23 +3152,23 @@ }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe" + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe", - "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", "shasum": "" }, "require": { - "php": ">=5.6" + "php": "^5.6 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~5" + "phpunit/phpunit": "^5.7 || ^6.0" }, "type": "library", "extra": { @@ -3175,7 +3193,7 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2016-02-13 06:45:14" + "time": "2017-03-04 06:30:41" }, { "name": "sebastian/comparator", @@ -3463,16 +3481,16 @@ }, { "name": "sebastian/object-enumerator", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35" + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35", - "reference": "96f8a3f257b69e8128ad74d3a7fd464bcbaa3b35", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", "shasum": "" }, "require": { @@ -3505,7 +3523,7 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2016-11-19 07:35:10" + "time": "2017-02-18 15:18:39" }, { "name": "sebastian/recursion-context", @@ -3703,16 +3721,16 @@ }, { "name": "symfony/yaml", - "version": "v3.2.2", + "version": "v3.2.6", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "50eadbd7926e31842893c957eca362b21592a97d" + "reference": "093e416ad096355149e265ea2e4cc1f9ee40ab1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/50eadbd7926e31842893c957eca362b21592a97d", - "reference": "50eadbd7926e31842893c957eca362b21592a97d", + "url": "https://api.github.com/repos/symfony/yaml/zipball/093e416ad096355149e265ea2e4cc1f9ee40ab1a", + "reference": "093e416ad096355149e265ea2e4cc1f9ee40ab1a", "shasum": "" }, "require": { @@ -3754,7 +3772,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-01-03 13:51:32" + "time": "2017-03-07 16:47:02" }, { "name": "webmozart/assert", @@ -3809,7 +3827,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "mockery/mockery": 15 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/tests/TestCase.php b/tests/TestCase.php index 7ca3900..9a031c3 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -12,6 +12,12 @@ abstract class TestCase extends Illuminate\Foundation\Testing\TestCase */ protected $baseUrl = 'http://localhost'; + protected function setUp() + { + parent::setUp(); + Mockery::getConfiguration()->allowMockingNonExistentMethods(false); + } + /** * Creates the application. * diff --git a/tests/unit/TicketTest.php b/tests/unit/TicketTest.php index 282bb03..e52ff3b 100644 --- a/tests/unit/TicketTest.php +++ b/tests/unit/TicketTest.php @@ -40,7 +40,7 @@ class TicketTest extends TestCase { $order = factory(Order::class)->create(); $ticket = factory(Ticket::class)->create(['code' => null]); - TicketCode::shouldReceive('generate')->andReturn('TICKETCODE1'); + TicketCode::shouldReceive('generateFor')->with($ticket)->andReturn('TICKETCODE1'); $ticket->claimFor($order);