Bug #89149

Fix assertion ordering in test cases

Added by Oliver Hader 12 days ago. Updated 12 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Tests
Target version:
-
Start date:
2019-09-11
Due date:
% Done:

100%

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

Description

1) TYPO3\CMS\Backend\Tests\Functional\Clipboard\ClipboardTest::localizationsAreResolved with data set "live workspace with live & version localizations" (1100, 0, array('FR: Welcome', 'FR-CA: Welcome'))
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
 Array &0 (
-    0 => 'FR: Welcome'
-    1 => 'FR-CA: Welcome'
+    0 => 'FR-CA: Welcome'
+    1 => 'FR: Welcome'
 )

Use assertEqualsCanonicalizing instead of assertSame on array values to ignore ordering.


Related issues

Follows TYPO3 Core - Bug #89138: Correctly retrieve workspace versions Resolved 2019-09-10

Associated revisions

Revision 203b83ca (diff)
Added by Oliver Hader 12 days ago

[BUGFIX] Fix assertion ordering in test cases

  • use assertEqualsCanonicalizing instead of assertSame
    on array values to ignore ordering
  • apply sorting order for localizations retrieved in
    Clipboard (drive-by fix)
  • properly tearDown left-over instances of previous
    test execution

Resolves: #89149
Releases: master
Change-Id: I369509bae1f58b7eeabe522c3a00af3ef86bb66f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61666
Tested-by: TYPO3com <>
Tested-by: Benni Mack <>
Reviewed-by: Benni Mack <>

History

#1 Updated by Gerrit Code Review 12 days 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/+/61666

#2 Updated by Oliver Hader 12 days ago

  • Follows Bug #89138: Correctly retrieve workspace versions added

#3 Updated by Oliver Hader 12 days ago

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

Also available in: Atom PDF