From 6137862a466de1ac35df5726535b842dae690cb8 Mon Sep 17 00:00:00 2001 From: Jarek Tkaczyk Date: Wed, 18 Mar 2020 22:21:50 +0800 Subject: [PATCH] removed deprecated casting to string --- src/MocksMixins.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MocksMixins.php b/src/MocksMixins.php index 271fc26..a714bc1 100644 --- a/src/MocksMixins.php +++ b/src/MocksMixins.php @@ -123,7 +123,7 @@ protected function buildExpectedQueryMock(Closure $expectations) $expected_mock = $ref->getParameters()[0] ?? null; - return $expected_mock !== null && (string) $expected_mock->getType() === 'Mockery\\MockInterface' + return $expected_mock !== null && $expected_mock->getType()->getName() === 'Mockery\\MockInterface' ? call_user_func('Mockery::mock') : $this->createMixinMock(EloquentBuilder::class, QueryBuilder::class); }