[TASK] Add mock methods to dynamic return types configuration 39/49739/2
authorSascha Egerer <sascha@sascha-egerer.de>
Fri, 2 Sep 2016 07:21:04 +0000 (09:21 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 2 Sep 2016 15:55:08 +0000 (17:55 +0200)
Add mock methods to the PHPStorm "dynamic return types"
plugin configuration to remove a bunch of warnings in PHPStorm.

Resolves: #77770
Releases: master
Change-Id: I30727ab2fc1d53e75ee7969ea16c8af0104d7323
Reviewed-on: https://review.typo3.org/49739
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
dynamicReturnTypeMeta.json

index ea38630..c1d968c 100644 (file)
@@ -1,8 +1,6 @@
 {
        // configuration file for PHPStorm Plugin: http://plugins.jetbrains.com/plugin/7251
        "methodCalls": [
-               // Do not add the methods getMock or getAccessibleMock to this configuration
-               // because additive type information gets lost. Use comments to define object types.
                {
                        "class": "\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility",
                        "method": "makeInstance",
                        "class": "\\TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface",
                        "method": "get",
                        "position": 0
+               },
+               {
+                       "class": "\\PHPUnit_Framework_TestCase",
+                       "method": "prophesize",
+                       "position": 0,
+                       "mask": "%s|\\Prophecy\\Prophecy\\ObjectProphecy"
+               },
+               {
+                       "class": "\\PHPUnit_Framework_TestCase",
+                       "method": "getMock",
+                       "position": 0,
+                       "mask": "%s|\\PHPUnit_Framework_MockObject_MockObject"
+               },
+               {
+                       "class": "\\PHPUnit_Framework_TestCase",
+                       "method": "createMock",
+                       "position": 0,
+                       "mask": "%s|\\PHPUnit_Framework_MockObject_MockObject"
+               },
+               {
+                       "class": "\\TYPO3\\CMS\\Core\\Tests\\BaseTestCase",
+                       "method": "getAccessibleMock",
+                       "position": 0,
+                       "mask": "%s|\\PHPUnit_Framework_MockObject_MockObject|\\TYPO3\\CMS\\Core\\Tests\\AccessibleObjectInterface"
+               },
+               {
+                       "class": "\\TYPO3\\CMS\\Core\\Tests\\BaseTestCase",
+                       "method": "getAccessibleMockForAbstractClass",
+                       "position": 0,
+                       "mask": "%s|\\PHPUnit_Framework_MockObject_MockObject|\\TYPO3\\CMS\\Core\\Tests\\AccessibleObjectInterface"
                }
        ],
        "functionCalls": [