File tree Expand file tree Collapse file tree 3 files changed +3
-11
lines changed Expand file tree Collapse file tree 3 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,7 @@ public function it_returns_valid_mysql_now()
99 {
1010 $ mock = m::mock ('alias:Illuminate\Support\Facades\DB ' );
1111 $ mock ->shouldReceive ('selectOne ' )->withArgs (['select now() as now ' ])->once ()->andReturnUsing (function () {
12- $ object = new StdClass ();
13- $ object ->now = '2016-09-17 18:49:46 ' ;
14- return $ object ;
12+ return (object ) ['now ' => '2016-09-17 18:49:46 ' ];
1513 });
1614
1715 $ this ->assertEquals ('2016-09-17 18:49:46 ' , db_mysql_now ());
Original file line number Diff line number Diff line change @@ -24,10 +24,7 @@ public function it_returns_value_for_known_mysql_variable()
2424 ->withArgs (['show variables where variable_name = ? ' , ['hostname ' ]])
2525 ->once ()
2626 ->andReturnUsing (function () {
27- $ object = new StdClass ();
28- $ object ->Variable_name = 'hostname ' ;
29- $ object ->Value = 'localhost ' ;
30- return $ object ;
27+ return (object ) ['Variable_name ' => 'hostname ' , 'Value ' => 'localhost ' ];
3128 });
3229
3330 $ this ->assertEquals ('localhost ' , db_mysql_variable ('hostname ' ));
Original file line number Diff line number Diff line change @@ -113,10 +113,7 @@ public function it_returns_true_with_json_encoded_array_passed()
113113 /** @test */
114114 public function it_returns_true_with_json_encoded_object_passed ()
115115 {
116- $ object = new StdClass ();
117- $ object ->foo = 'bar ' ;
118- $ object ->baz = 'bax ' ;
119- $ json = json_encode ($ object );
116+ $ json = json_encode ((object ) ['foo ' => 'bar ' , 'baz ' => 'bax ' ]);
120117 $ this ->assertTrue (is_json ($ json ));
121118 }
122119
You can’t perform that action at this time.
0 commit comments