Task #87742

Use real ObjectManager stubs in unit tests

Added by Benjamin Franzke about 1 month ago. Updated 28 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
-
Start date:
2019-02-19
Due date:
% Done:

100%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Prevent invocation of the constructor (which instantiates
an internal instance of the extbase container) and do not
mix usage of mocked and stubbed methods.

The mixture happened due to using setMethods(['get']) – where
all other methods (besides 'get()') are actually proxied to the
real ObjectManager.

Associated revisions

Revision 7af4a986 (diff)
Added by Benjamin Franzke 28 days ago

[TASK] Use real ObjectManager stubs in unit tests

Prevent invocation of the constructor (which instantiates
an internal instance of the extbase container) and do not
mix usage of mocked and stubbed methods.

The mixture happened due to the usage of setMethods():
When specifing `setMethods(['get'])` all methods besides ->get()
are actually proxied to the real ObjectManager methods.

Releases: master, 9.5
Resolves: #87742
Change-Id: I817f8ee90d82f36b8117e873b5802e11f601384e
Reviewed-on: https://review.typo3.org/c/59757
Tested-by: TYPO3com <>
Tested-by: Benni Mack <>
Tested-by: Susanne Moog <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Benni Mack <>
Reviewed-by: Susanne Moog <>
Reviewed-by: Anja Leichsenring <>

Revision 92d67458 (diff)
Added by Benjamin Franzke 28 days ago

[TASK] Use real ObjectManager stubs in unit tests

Prevent invocation of the constructor (which instantiates
an internal instance of the extbase container) and do not
mix usage of mocked and stubbed methods.

The mixture happened due to the usage of setMethods():
When specifing `setMethods(['get'])` all methods besides ->get()
are actually proxied to the real ObjectManager methods.

Releases: master, 9.5
Resolves: #87742
Change-Id: I817f8ee90d82f36b8117e873b5802e11f601384e
Reviewed-on: https://review.typo3.org/c/59787
Tested-by: TYPO3com <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Anja Leichsenring <>

History

#1 Updated by Gerrit Code Review about 1 month ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59757

#2 Updated by Gerrit Code Review about 1 month ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59757

#3 Updated by Gerrit Code Review 28 days ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59787

#4 Updated by Benjamin Franzke 28 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF