@@ -41,10 +41,12 @@ public function tearDown()
4141 * @dataProvider getOutputDataProvider
4242 * @param $expected
4343 * @param $config
44+ * @param $queue
4445 */
45- public function testForceRebuildCommand ($ expected , $ config )
46+ public function testForceRebuildCommand ($ expected , $ config, $ queue )
4647 {
4748 Config::set ('laravel-lucene-search::index.models ' , $ config );
49+ Config::set ('laravel-lucene-search::queue ' , $ queue );
4850
4951 $ output = new BufferedOutput ();
5052 $ this ->artisan ->call ('search:rebuild ' , ['--verbose ' => true , '--force ' => true ], $ output );
@@ -56,10 +58,12 @@ public function testForceRebuildCommand($expected, $config)
5658 * @dataProvider getOutputDataProvider
5759 * @param $expected
5860 * @param $config
61+ * @param $queue
5962 */
60- public function testSoftRebuildCommand ($ expected , $ config )
63+ public function testSoftRebuildCommand ($ expected , $ config, $ queue )
6164 {
6265 Config::set ('laravel-lucene-search::index.models ' , $ config );
66+ Config::set ('laravel-lucene-search::queue ' , $ queue );
6367
6468 $ output = new BufferedOutput ();
6569 $ this ->artisan ->call ('search:rebuild ' , ['--verbose ' => true ], $ output );
@@ -88,7 +92,45 @@ public function getOutputDataProvider()
8892 'tests\models\Tool ' => [
8993 'fields ' => ['name ' , 'description ' ],
9094 ],
91- ]
95+ ],
96+
97+ false ,
98+ ],
99+ [
100+ 'Creating index for model: "tests\models\Tool"
101+ No available models found.
102+
103+ Operation is fully complete!
104+ ' ,
105+ [
106+ 'tests\models\Tool ' => [
107+ 'fields ' => ['name ' , 'description ' ],
108+ ],
109+ ],
110+
111+ false ,
112+ ],
113+ [
114+ 'Creating index for model: "tests\models\Product"
115+ 0 [>---------------------------]
116+ 1 [->--------------------------]
117+
118+ Creating index for model: "tests\models\Tool"
119+ No available models found.
120+
121+ Operation is fully complete!
122+ ' ,
123+ [
124+ 'tests\models\Product ' => [
125+ 'fields ' => ['name ' , 'description ' ],
126+ ],
127+
128+ 'tests\models\Tool ' => [
129+ 'fields ' => ['name ' , 'description ' ],
130+ ],
131+ ],
132+
133+ 'search-sync-queue ' ,
92134 ],
93135 [
94136 'Creating index for model: "tests\models\Tool"
@@ -100,7 +142,9 @@ public function getOutputDataProvider()
100142 'tests\models\Tool ' => [
101143 'fields ' => ['name ' , 'description ' ],
102144 ],
103- ]
145+ ],
146+
147+ 'search-sync-queue ' ,
104148 ],
105149 ];
106150 }
0 commit comments