From 7dd8f7102f8df444dce84090b4232d14a1582fbf Mon Sep 17 00:00:00 2001 From: Philipp Date: Sat, 22 Jan 2022 21:44:12 +0100 Subject: [PATCH] Remove deprecated static mock --- tests/Util/DateTimeFormatMockTrait.php | 58 -------------------------- 1 file changed, 58 deletions(-) delete mode 100644 tests/Util/DateTimeFormatMockTrait.php diff --git a/tests/Util/DateTimeFormatMockTrait.php b/tests/Util/DateTimeFormatMockTrait.php deleted file mode 100644 index 9052096ea3..0000000000 --- a/tests/Util/DateTimeFormatMockTrait.php +++ /dev/null @@ -1,58 +0,0 @@ -. - * - */ - -namespace Friendica\Test\Util; - -use Friendica\Util\DateTimeFormat; -use Mockery\MockInterface; - -trait DateTimeFormatMockTrait -{ - /** - * @var MockInterface The mocking interface of Friendica\Database\DBA - */ - private $dtfMock; - - public function mockUtcNow($time, $times = null) - { - if (!isset($this->dtfMock)) { - $this->dtfMock = \Mockery::mock('alias:'. DateTimeFormat::class); - } - - $this->dtfMock - ->shouldReceive('utcNow') - ->andReturn($time) - ->times($times); - } - - public function mockUtc($input, $time, $times = null) - { - if (!isset($this->dtfMock)) { - $this->dtfMock = \Mockery::mock('alias:' . DateTimeFormat::class); - } - - $this->dtfMock - ->shouldReceive('utc') - ->with($input) - ->andReturn($time) - ->times($times); - } -}