Dan Brown

Fixed non-browserkit testcase and seeder issues

...@@ -4,21 +4,21 @@ ...@@ -4,21 +4,21 @@
4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5 "This file is @generated automatically" 5 "This file is @generated automatically"
6 ], 6 ],
7 - "hash": "27dd30e92f700ea9a8c2a0a2327d4f9f", 7 + "hash": "625ae196ac4c457c3aaff34235acbc4d",
8 "content-hash": "e851e9fd06efac8362604c39b0a17542", 8 "content-hash": "e851e9fd06efac8362604c39b0a17542",
9 "packages": [ 9 "packages": [
10 { 10 {
11 "name": "aws/aws-sdk-php", 11 "name": "aws/aws-sdk-php",
12 - "version": "3.21.4", 12 + "version": "3.21.6",
13 "source": { 13 "source": {
14 "type": "git", 14 "type": "git",
15 "url": "https://github.com/aws/aws-sdk-php.git", 15 "url": "https://github.com/aws/aws-sdk-php.git",
16 - "reference": "6408a4904a04eca44461a65ba4a0fae53f80417b" 16 + "reference": "b51512a4ad4aa080ab963942a1e234265771fcde"
17 }, 17 },
18 "dist": { 18 "dist": {
19 "type": "zip", 19 "type": "zip",
20 - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/6408a4904a04eca44461a65ba4a0fae53f80417b", 20 + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/b51512a4ad4aa080ab963942a1e234265771fcde",
21 - "reference": "6408a4904a04eca44461a65ba4a0fae53f80417b", 21 + "reference": "b51512a4ad4aa080ab963942a1e234265771fcde",
22 "shasum": "" 22 "shasum": ""
23 }, 23 },
24 "require": { 24 "require": {
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
85 "s3", 85 "s3",
86 "sdk" 86 "sdk"
87 ], 87 ],
88 - "time": "2017-01-25 00:43:08" 88 + "time": "2017-01-27 00:34:55"
89 }, 89 },
90 { 90 {
91 "name": "barryvdh/laravel-debugbar", 91 "name": "barryvdh/laravel-debugbar",
...@@ -799,16 +799,16 @@ ...@@ -799,16 +799,16 @@
799 }, 799 },
800 { 800 {
801 "name": "intervention/image", 801 "name": "intervention/image",
802 - "version": "2.3.9", 802 + "version": "2.3.11",
803 "source": { 803 "source": {
804 "type": "git", 804 "type": "git",
805 "url": "https://github.com/Intervention/image.git", 805 "url": "https://github.com/Intervention/image.git",
806 - "reference": "2bce9a59c43b868300b02a7d31a1e4aa67a200ae" 806 + "reference": "e8881fd99b9804b29e02d6d1c2c15ee459335cf1"
807 }, 807 },
808 "dist": { 808 "dist": {
809 "type": "zip", 809 "type": "zip",
810 - "url": "https://api.github.com/repos/Intervention/image/zipball/2bce9a59c43b868300b02a7d31a1e4aa67a200ae", 810 + "url": "https://api.github.com/repos/Intervention/image/zipball/e8881fd99b9804b29e02d6d1c2c15ee459335cf1",
811 - "reference": "2bce9a59c43b868300b02a7d31a1e4aa67a200ae", 811 + "reference": "e8881fd99b9804b29e02d6d1c2c15ee459335cf1",
812 "shasum": "" 812 "shasum": ""
813 }, 813 },
814 "require": { 814 "require": {
...@@ -857,7 +857,7 @@ ...@@ -857,7 +857,7 @@
857 "thumbnail", 857 "thumbnail",
858 "watermark" 858 "watermark"
859 ], 859 ],
860 - "time": "2017-01-10 14:15:56" 860 + "time": "2017-02-04 10:37:19"
861 }, 861 },
862 { 862 {
863 "name": "knplabs/knp-snappy", 863 "name": "knplabs/knp-snappy",
...@@ -973,16 +973,16 @@ ...@@ -973,16 +973,16 @@
973 }, 973 },
974 { 974 {
975 "name": "laravel/framework", 975 "name": "laravel/framework",
976 - "version": "v5.4.3", 976 + "version": "v5.4.9",
977 "source": { 977 "source": {
978 "type": "git", 978 "type": "git",
979 "url": "https://github.com/laravel/framework.git", 979 "url": "https://github.com/laravel/framework.git",
980 - "reference": "9fa94bf77272ea7f920292c6f016b0f6e0853f98" 980 + "reference": "600330ae1d218919b3b307e0578461a2df248663"
981 }, 981 },
982 "dist": { 982 "dist": {
983 "type": "zip", 983 "type": "zip",
984 - "url": "https://api.github.com/repos/laravel/framework/zipball/9fa94bf77272ea7f920292c6f016b0f6e0853f98", 984 + "url": "https://api.github.com/repos/laravel/framework/zipball/600330ae1d218919b3b307e0578461a2df248663",
985 - "reference": "9fa94bf77272ea7f920292c6f016b0f6e0853f98", 985 + "reference": "600330ae1d218919b3b307e0578461a2df248663",
986 "shasum": "" 986 "shasum": ""
987 }, 987 },
988 "require": { 988 "require": {
...@@ -1098,20 +1098,20 @@ ...@@ -1098,20 +1098,20 @@
1098 "framework", 1098 "framework",
1099 "laravel" 1099 "laravel"
1100 ], 1100 ],
1101 - "time": "2017-01-25 16:40:49" 1101 + "time": "2017-02-03 19:47:35"
1102 }, 1102 },
1103 { 1103 {
1104 "name": "laravel/socialite", 1104 "name": "laravel/socialite",
1105 - "version": "v3.0.2", 1105 + "version": "v3.0.3",
1106 "source": { 1106 "source": {
1107 "type": "git", 1107 "type": "git",
1108 "url": "https://github.com/laravel/socialite.git", 1108 "url": "https://github.com/laravel/socialite.git",
1109 - "reference": "d3aaffa5e122395e54eb2c26062fde3a848c40fd" 1109 + "reference": "01588748beef55ad5dd4f172d235548d3a6be79a"
1110 }, 1110 },
1111 "dist": { 1111 "dist": {
1112 "type": "zip", 1112 "type": "zip",
1113 - "url": "https://api.github.com/repos/laravel/socialite/zipball/d3aaffa5e122395e54eb2c26062fde3a848c40fd", 1113 + "url": "https://api.github.com/repos/laravel/socialite/zipball/01588748beef55ad5dd4f172d235548d3a6be79a",
1114 - "reference": "d3aaffa5e122395e54eb2c26062fde3a848c40fd", 1114 + "reference": "01588748beef55ad5dd4f172d235548d3a6be79a",
1115 "shasum": "" 1115 "shasum": ""
1116 }, 1116 },
1117 "require": { 1117 "require": {
...@@ -1152,20 +1152,20 @@ ...@@ -1152,20 +1152,20 @@
1152 "laravel", 1152 "laravel",
1153 "oauth" 1153 "oauth"
1154 ], 1154 ],
1155 - "time": "2017-01-25 17:58:13" 1155 + "time": "2017-02-01 13:43:56"
1156 }, 1156 },
1157 { 1157 {
1158 "name": "league/flysystem", 1158 "name": "league/flysystem",
1159 - "version": "1.0.33", 1159 + "version": "1.0.34",
1160 "source": { 1160 "source": {
1161 "type": "git", 1161 "type": "git",
1162 "url": "https://github.com/thephpleague/flysystem.git", 1162 "url": "https://github.com/thephpleague/flysystem.git",
1163 - "reference": "5c7f98498b12d47f9de90ec9186a90000125777c" 1163 + "reference": "469ad53c13ea19a0e54e3e5d70f61227ddcc0299"
1164 }, 1164 },
1165 "dist": { 1165 "dist": {
1166 "type": "zip", 1166 "type": "zip",
1167 - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/5c7f98498b12d47f9de90ec9186a90000125777c", 1167 + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/469ad53c13ea19a0e54e3e5d70f61227ddcc0299",
1168 - "reference": "5c7f98498b12d47f9de90ec9186a90000125777c", 1168 + "reference": "469ad53c13ea19a0e54e3e5d70f61227ddcc0299",
1169 "shasum": "" 1169 "shasum": ""
1170 }, 1170 },
1171 "require": { 1171 "require": {
...@@ -1235,7 +1235,7 @@ ...@@ -1235,7 +1235,7 @@
1235 "sftp", 1235 "sftp",
1236 "storage" 1236 "storage"
1237 ], 1237 ],
1238 - "time": "2017-01-23 10:32:09" 1238 + "time": "2017-01-30 17:41:17"
1239 }, 1239 },
1240 { 1240 {
1241 "name": "league/flysystem-aws-s3-v3", 1241 "name": "league/flysystem-aws-s3-v3",
...@@ -2237,7 +2237,7 @@ ...@@ -2237,7 +2237,7 @@
2237 }, 2237 },
2238 { 2238 {
2239 "name": "symfony/css-selector", 2239 "name": "symfony/css-selector",
2240 - "version": "v3.1.9", 2240 + "version": "v3.1.10",
2241 "source": { 2241 "source": {
2242 "type": "git", 2242 "type": "git",
2243 "url": "https://github.com/symfony/css-selector.git", 2243 "url": "https://github.com/symfony/css-selector.git",
...@@ -2347,16 +2347,16 @@ ...@@ -2347,16 +2347,16 @@
2347 }, 2347 },
2348 { 2348 {
2349 "name": "symfony/dom-crawler", 2349 "name": "symfony/dom-crawler",
2350 - "version": "v3.1.9", 2350 + "version": "v3.1.10",
2351 "source": { 2351 "source": {
2352 "type": "git", 2352 "type": "git",
2353 "url": "https://github.com/symfony/dom-crawler.git", 2353 "url": "https://github.com/symfony/dom-crawler.git",
2354 - "reference": "a950260ebc947578fba82a3222e2085d90682376" 2354 + "reference": "7eede2a901a19928494194f7d1815a77b9a473a0"
2355 }, 2355 },
2356 "dist": { 2356 "dist": {
2357 "type": "zip", 2357 "type": "zip",
2358 - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/a950260ebc947578fba82a3222e2085d90682376", 2358 + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/7eede2a901a19928494194f7d1815a77b9a473a0",
2359 - "reference": "a950260ebc947578fba82a3222e2085d90682376", 2359 + "reference": "7eede2a901a19928494194f7d1815a77b9a473a0",
2360 "shasum": "" 2360 "shasum": ""
2361 }, 2361 },
2362 "require": { 2362 "require": {
...@@ -2399,7 +2399,7 @@ ...@@ -2399,7 +2399,7 @@
2399 ], 2399 ],
2400 "description": "Symfony DomCrawler Component", 2400 "description": "Symfony DomCrawler Component",
2401 "homepage": "https://symfony.com", 2401 "homepage": "https://symfony.com",
2402 - "time": "2017-01-02 20:31:54" 2402 + "time": "2017-01-21 17:13:55"
2403 }, 2403 },
2404 { 2404 {
2405 "name": "symfony/event-dispatcher", 2405 "name": "symfony/event-dispatcher",
...@@ -3268,16 +3268,16 @@ ...@@ -3268,16 +3268,16 @@
3268 }, 3268 },
3269 { 3269 {
3270 "name": "myclabs/deep-copy", 3270 "name": "myclabs/deep-copy",
3271 - "version": "1.5.5", 3271 + "version": "1.6.0",
3272 "source": { 3272 "source": {
3273 "type": "git", 3273 "type": "git",
3274 "url": "https://github.com/myclabs/DeepCopy.git", 3274 "url": "https://github.com/myclabs/DeepCopy.git",
3275 - "reference": "399c1f9781e222f6eb6cc238796f5200d1b7f108" 3275 + "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe"
3276 }, 3276 },
3277 "dist": { 3277 "dist": {
3278 "type": "zip", 3278 "type": "zip",
3279 - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/399c1f9781e222f6eb6cc238796f5200d1b7f108", 3279 + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/5a5a9fc8025a08d8919be87d6884d5a92520cefe",
3280 - "reference": "399c1f9781e222f6eb6cc238796f5200d1b7f108", 3280 + "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe",
3281 "shasum": "" 3281 "shasum": ""
3282 }, 3282 },
3283 "require": { 3283 "require": {
...@@ -3306,7 +3306,7 @@ ...@@ -3306,7 +3306,7 @@
3306 "object", 3306 "object",
3307 "object graph" 3307 "object graph"
3308 ], 3308 ],
3309 - "time": "2016-10-31 17:19:45" 3309 + "time": "2017-01-26 22:05:40"
3310 }, 3310 },
3311 { 3311 {
3312 "name": "phpdocumentor/reflection-common", 3312 "name": "phpdocumentor/reflection-common",
...@@ -3763,16 +3763,16 @@ ...@@ -3763,16 +3763,16 @@
3763 }, 3763 },
3764 { 3764 {
3765 "name": "phpunit/phpunit", 3765 "name": "phpunit/phpunit",
3766 - "version": "5.7.6", 3766 + "version": "5.7.10",
3767 "source": { 3767 "source": {
3768 "type": "git", 3768 "type": "git",
3769 "url": "https://github.com/sebastianbergmann/phpunit.git", 3769 "url": "https://github.com/sebastianbergmann/phpunit.git",
3770 - "reference": "caf8141b89691498d91aaac6c82e9cd5f685ae86" 3770 + "reference": "bf0804199f516fe80ffcc48ac6d4741c49baeb6e"
3771 }, 3771 },
3772 "dist": { 3772 "dist": {
3773 "type": "zip", 3773 "type": "zip",
3774 - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/caf8141b89691498d91aaac6c82e9cd5f685ae86", 3774 + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bf0804199f516fe80ffcc48ac6d4741c49baeb6e",
3775 - "reference": "caf8141b89691498d91aaac6c82e9cd5f685ae86", 3775 + "reference": "bf0804199f516fe80ffcc48ac6d4741c49baeb6e",
3776 "shasum": "" 3776 "shasum": ""
3777 }, 3777 },
3778 "require": { 3778 "require": {
...@@ -3789,11 +3789,11 @@ ...@@ -3789,11 +3789,11 @@
3789 "phpunit/php-text-template": "~1.2", 3789 "phpunit/php-text-template": "~1.2",
3790 "phpunit/php-timer": "^1.0.6", 3790 "phpunit/php-timer": "^1.0.6",
3791 "phpunit/phpunit-mock-objects": "^3.2", 3791 "phpunit/phpunit-mock-objects": "^3.2",
3792 - "sebastian/comparator": "~1.2.2", 3792 + "sebastian/comparator": "^1.2.4",
3793 "sebastian/diff": "~1.2", 3793 "sebastian/diff": "~1.2",
3794 "sebastian/environment": "^1.3.4 || ^2.0", 3794 "sebastian/environment": "^1.3.4 || ^2.0",
3795 "sebastian/exporter": "~2.0", 3795 "sebastian/exporter": "~2.0",
3796 - "sebastian/global-state": "^1.0 || ^2.0", 3796 + "sebastian/global-state": "^1.1",
3797 "sebastian/object-enumerator": "~2.0", 3797 "sebastian/object-enumerator": "~2.0",
3798 "sebastian/resource-operations": "~1.0", 3798 "sebastian/resource-operations": "~1.0",
3799 "sebastian/version": "~1.0|~2.0", 3799 "sebastian/version": "~1.0|~2.0",
...@@ -3841,7 +3841,7 @@ ...@@ -3841,7 +3841,7 @@
3841 "testing", 3841 "testing",
3842 "xunit" 3842 "xunit"
3843 ], 3843 ],
3844 - "time": "2017-01-22 08:39:59" 3844 + "time": "2017-02-04 09:03:53"
3845 }, 3845 },
3846 { 3846 {
3847 "name": "phpunit/phpunit-mock-objects", 3847 "name": "phpunit/phpunit-mock-objects",
...@@ -3949,16 +3949,16 @@ ...@@ -3949,16 +3949,16 @@
3949 }, 3949 },
3950 { 3950 {
3951 "name": "sebastian/comparator", 3951 "name": "sebastian/comparator",
3952 - "version": "1.2.2", 3952 + "version": "1.2.4",
3953 "source": { 3953 "source": {
3954 "type": "git", 3954 "type": "git",
3955 "url": "https://github.com/sebastianbergmann/comparator.git", 3955 "url": "https://github.com/sebastianbergmann/comparator.git",
3956 - "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f" 3956 + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be"
3957 }, 3957 },
3958 "dist": { 3958 "dist": {
3959 "type": "zip", 3959 "type": "zip",
3960 - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/6a1ed12e8b2409076ab22e3897126211ff8b1f7f", 3960 + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
3961 - "reference": "6a1ed12e8b2409076ab22e3897126211ff8b1f7f", 3961 + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
3962 "shasum": "" 3962 "shasum": ""
3963 }, 3963 },
3964 "require": { 3964 "require": {
...@@ -4009,7 +4009,7 @@ ...@@ -4009,7 +4009,7 @@
4009 "compare", 4009 "compare",
4010 "equality" 4010 "equality"
4011 ], 4011 ],
4012 - "time": "2016-11-19 09:18:40" 4012 + "time": "2017-01-29 09:50:25"
4013 }, 4013 },
4014 { 4014 {
4015 "name": "sebastian/diff", 4015 "name": "sebastian/diff",
......
...@@ -11,14 +11,14 @@ class DummyContentSeeder extends Seeder ...@@ -11,14 +11,14 @@ class DummyContentSeeder extends Seeder
11 */ 11 */
12 public function run() 12 public function run()
13 { 13 {
14 - $user = factory(BookStack\User::class, 1)->create(); 14 + $user = factory(\BookStack\User::class)->create();
15 $role = \BookStack\Role::getRole('editor'); 15 $role = \BookStack\Role::getRole('editor');
16 $user->attachRole($role); 16 $user->attachRole($role);
17 17
18 18
19 - $books = factory(BookStack\Book::class, 20)->create(['created_by' => $user->id, 'updated_by' => $user->id]) 19 + $books = factory(\BookStack\Book::class, 20)->create(['created_by' => $user->id, 'updated_by' => $user->id])
20 ->each(function($book) use ($user) { 20 ->each(function($book) use ($user) {
21 - $chapters = factory(BookStack\Chapter::class, 5)->create(['created_by' => $user->id, 'updated_by' => $user->id]) 21 + $chapters = factory(\BookStack\Chapter::class, 5)->create(['created_by' => $user->id, 'updated_by' => $user->id])
22 ->each(function($chapter) use ($user, $book){ 22 ->each(function($chapter) use ($user, $book){
23 $pages = factory(\BookStack\Page::class, 5)->make(['created_by' => $user->id, 'updated_by' => $user->id, 'book_id' => $book->id]); 23 $pages = factory(\BookStack\Page::class, 5)->make(['created_by' => $user->id, 'updated_by' => $user->id, 'book_id' => $book->id]);
24 $chapter->pages()->saveMany($pages); 24 $chapter->pages()->saveMany($pages);
......
...@@ -4,11 +4,13 @@ use BookStack\Book; ...@@ -4,11 +4,13 @@ use BookStack\Book;
4 use BookStack\Chapter; 4 use BookStack\Chapter;
5 use BookStack\Repos\EntityRepo; 5 use BookStack\Repos\EntityRepo;
6 use BookStack\Role; 6 use BookStack\Role;
7 +use Illuminate\Foundation\Testing\DatabaseTransactions;
7 use Illuminate\Foundation\Testing\TestCase as BaseTestCase; 8 use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
8 9
9 abstract class TestCase extends BaseTestCase 10 abstract class TestCase extends BaseTestCase
10 { 11 {
11 use CreatesApplication; 12 use CreatesApplication;
13 + use DatabaseTransactions;
12 14
13 protected $admin; 15 protected $admin;
14 16
......