Skip to content

Commit d704958

Browse files
committed
Mockery 1.0 features used.
1 parent 56ea32a commit d704958

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/HelperFunctions/db/DbMysqlNowTest.php

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,14 @@
33
namespace Illuminated\Helpers\HelperFunctions\Tests\Db;
44

55
use Illuminated\Helpers\HelperFunctions\Tests\TestCase;
6-
use Mockery;
76

87
class 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
}

0 commit comments

Comments
 (0)