File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 33namespace Illuminated \Helpers \HelperFunctions \Tests \Db ;
44
55use Illuminated \Helpers \HelperFunctions \Tests \TestCase ;
6- use Mockery ;
76
87class DbMysqlNowTest extends TestCase
98{
109 /** @test */
1110 public function it_returns_valid_mysql_datetime ()
1211 {
13- $ mock = Mockery::mock ('alias:Illuminate\Support\Facades\DB ' );
14- $ mock ->shouldReceive ('selectOne ' )->withArgs (['select now() as now ' ])->once ()->andReturnUsing (function () {
15- return (object ) ['now ' => '2016-09-17 18:49:46 ' ];
16- });
12+ $ mock = mock ('alias:Illuminate\Support\Facades\DB ' );
13+ $ mock ->expects ()->selectOne ('select now() as now ' )->andReturn ((object ) ['now ' => '2016-09-17 18:49:46 ' ]);
1714
1815 $ this ->assertEquals ('2016-09-17 18:49:46 ' , db_mysql_now ());
1916 }
You can’t perform that action at this time.
0 commit comments