[BUGFIX] Follow-Up: Fix major bug in Enumeration::equals + Tests 34/24634/11
authorSascha Egerer <sascha.egerer@dkd.de>
Sat, 12 Oct 2013 15:29:10 +0000 (17:29 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sun, 13 Oct 2013 09:58:28 +0000 (11:58 +0200)
commitb864789b621c46e9a8fc417d2f34a5f20fe05767
treec7a5e5cd2383690b2dffb3a77bf397359835bf2a
parentbedddf2e0fb50b0ebe3751f8563ee8021c945303
[BUGFIX] Follow-Up: Fix major bug in Enumeration::equals + Tests

* Fixed major bug in Enumeration->equals method by
  changing object comparison to loose comparison
* Optimized Enumeration at some places
* Do not throw generic exceptions but specific exceptions
* Add Unit tests
* Move "cast" function from VersionState to Enumeration

Resolves: #52551
Releases: 6.2
Change-Id: Ief64bc08e474c38036d34ed3791c13e39661e9b3
Reviewed-on: https://review.typo3.org/24634
Reviewed-by: Sebastian Fischer
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/core/Classes/Type/Enumeration.php
typo3/sysext/core/Classes/Type/Exception.php [new file with mode: 0644]
typo3/sysext/core/Classes/Type/Exception/InvalidEnumerationDefinitionException.php [new file with mode: 0644]
typo3/sysext/core/Classes/Type/Exception/InvalidEnumerationValueException.php [new file with mode: 0644]
typo3/sysext/core/Classes/Versioning/VersionState.php
typo3/sysext/core/Tests/Unit/Type/EnumerationTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Type/Fixture/Enumeration/CompleteEnumeration.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Type/Fixture/Enumeration/DuplicateConstantValueEnumeration.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Type/Fixture/Enumeration/InvalidConstantEnumeration.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Type/Fixture/Enumeration/MissingConstantsEnumeration.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Type/Fixture/Enumeration/MissingDefaultEnumeration.php [new file with mode: 0644]