@@ -38,10 +38,10 @@ public function setUp()
3838 ->andReturn (['class_uid ' , '12345 ' ]);
3939 $ this ->config ->shouldReceive ('fields ' )
4040 ->with ($ this ->model )
41- ->andReturn (['name ' ]);
41+ ->andReturn (['name ' => [ ' boost ' => 1 ] ]);
4242
4343 $ this ->config ->shouldReceive ('optionalAttributes ' )
44- ->andReturn (['optional_attribute1 ' => ' optional value ' ]);
44+ ->andReturn (['optional_attribute1 ' => [ ' boost ' => 1 , ' value ' => ' optional value '] ]);
4545
4646 }
4747
@@ -52,8 +52,14 @@ public function testUpdate()
5252 $ doc = new Document ();
5353 $ doc ->addField (Field::keyword ('private_key ' , 1 ));
5454 $ doc ->addField (Field::Keyword ('class_uid ' , '12345 ' ));
55- $ doc ->addField (Field::unStored ('name ' , 'test name ' ));
56- $ doc ->addField (Field::unStored ('optional_attribute1 ' , 'optional value ' ));
55+
56+ $ field = Field::unStored ('name ' , 'test name ' );
57+ $ field ->boost = 1 ;
58+ $ doc ->addField ($ field );
59+
60+ $ field = Field::unStored ('optional_attribute1 ' , 'optional value ' );
61+ $ field ->boost = 1 ;
62+ $ doc ->addField ($ field );
5763
5864 $ this ->assertEquals ($ doc , $ arg );
5965 return true ;
@@ -67,10 +73,10 @@ public function testUpdate()
6773 $ this ->assertEquals ($ term , $ arg );
6874 return true ;
6975 }))->andReturnUsing (function () {
70- $ hitMock = m::mock ();
71- $ hitMock ->id = 10 ;
72- return [$ hitMock ];
73- })->once ();
76+ $ hitMock = m::mock ();
77+ $ hitMock ->id = 10 ;
78+ return [$ hitMock ];
79+ })->once ();
7480
7581 $ luceneIndex ->shouldReceive ('delete ' )->with (10 )->once ();
7682
@@ -91,10 +97,10 @@ public function testDelete()
9197 $ this ->assertEquals ($ term , $ arg );
9298 return true ;
9399 }))->andReturnUsing (function () {
94- $ hitMock = m::mock ();
95- $ hitMock ->id = 10 ;
96- return [$ hitMock ];
97- });
100+ $ hitMock = m::mock ();
101+ $ hitMock ->id = 10 ;
102+ return [$ hitMock ];
103+ });
98104
99105 $ luceneIndex ->shouldReceive ('delete ' )->with (10 )->once ();
100106
0 commit comments