]> git.mxchange.org Git - friendica.git/blobdiff - tests/Util/DateTimeFormatMockTrait.php
Merge remote-tracking branch 'upstream/2021.12-rc' into api-fixes
[friendica.git] / tests / Util / DateTimeFormatMockTrait.php
index 1f1ad0199a52caf6b2271133448644697f6dc37c..4d7ba017042abf147127653f48f2d90dda4e04c2 100644 (file)
@@ -1,7 +1,27 @@
 <?php
+/**
+ * @copyright Copyright (C) 2010-2021, the Friendica project
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
 
 namespace Friendica\Test\Util;
 
+use Friendica\Util\DateTimeFormat;
 use Mockery\MockInterface;
 
 trait DateTimeFormatMockTrait
@@ -14,7 +34,7 @@ trait DateTimeFormatMockTrait
        public function mockUtcNow($time, $times = null)
        {
                if (!isset($this->dtfMock)) {
-                       $this->dtfMock = \Mockery::mock('alias:Friendica\Util\DateTimeFormat');
+                       $this->dtfMock = \Mockery::mock('alias:'. DateTimeFormat::class);
                }
 
                $this->dtfMock
@@ -26,7 +46,7 @@ trait DateTimeFormatMockTrait
        public function mockUtc($input, $time, $times = null)
        {
                if (!isset($this->dtfMock)) {
-                       $this->dtfMock = \Mockery::mock('alias:Friendica\Util\DateTimeFormat');
+                       $this->dtfMock = \Mockery::mock('alias:' . DateTimeFormat::class);
                }
 
                $this->dtfMock