diff options
Diffstat (limited to 'plugins/SegmentEditor/tests/Unit/SegmentQueryDecoratorTest.php')
-rw-r--r-- | plugins/SegmentEditor/tests/Unit/SegmentQueryDecoratorTest.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/SegmentEditor/tests/Unit/SegmentQueryDecoratorTest.php b/plugins/SegmentEditor/tests/Unit/SegmentQueryDecoratorTest.php index c3f4a2da55..848080c2af 100644 --- a/plugins/SegmentEditor/tests/Unit/SegmentQueryDecoratorTest.php +++ b/plugins/SegmentEditor/tests/Unit/SegmentQueryDecoratorTest.php @@ -31,7 +31,7 @@ class SegmentQueryDecoratorTest extends \PHPUnit\Framework\TestCase */ private $decorator; - public function setUp() + public function setUp(): void { parent::setUp(); @@ -83,8 +83,11 @@ class SegmentQueryDecoratorTest extends \PHPUnit\Framework\TestCase private function getMockSegmentEditorService() { - $mock = $this->getMock('Piwik\Plugins\SegmentEditor\Services\StoredSegmentService', - array('getAllSegmentsAndIgnoreVisibility'), array(), '', $callOriginalConstructor = false); + $mock = $this->getMockBuilder('Piwik\Plugins\SegmentEditor\Services\StoredSegmentService') + ->setMethods(['getAllSegmentsAndIgnoreVisibility']) + ->setConstructorArgs([]) + ->disableOriginalConstructor() + ->getMock(); $mock->expects($this->any())->method('getAllSegmentsAndIgnoreVisibility')->willReturn(self::$storedSegments); return $mock; } |