VariableFrontend tests fail if igbinary php module is active
All tests which use a direct serialize() of a given input fail, if igbinary php module is running.
This is because the tests expect that the returned strings are serialized() with the standard php method, but they are in fact serialized by igbinary_serialize().
Todo: Fix all tests in VariableFrontend which use serialize() and take care of igbinary.
Updated by Christian Kuhn almost 11 years ago
I'm confused, maybe someone could help me out.
I've backported the igbinary serializer patch from FLOW3 to TYPO3v4, which leads to failing tests in v4 for all tests of the variableFrontend which use serialize() to compare data which is issued to a backend with the expected value. I'd expect those tests to fail in FLOW3 as well, but they don't.
I've taken the setPassesSerializedStringToBackend() as a testcase to dig into this.
Applied attached patch. It just does a print_r() of the serialize of the variable within the test, and the igbinary_serialize() in the variable frontend immediately before the call of backend->set()
Output (first: testcase out, second: variableFrontend out):
s:15:"Just some value";
Just some value
So, the output is different, thus I'd expect the $this->equalTo(serialize($theString)) expectation of the mockBackend in the test to fail ... but it doesn't in FLOW3 (it does in TYPO3v4).
So ... what is wrong here? I don't get it ... Why does this test not fail, even if the two values (actual and expected) are different?
Updated by Karsten Dambekalns over 10 years ago
- Status changed from New to Closed
- Assignee set to Karsten Dambekalns
- Target version set to 1.0 beta 1
Because the use if igbinary is subject to a flag that is set in
initializeObject(), but that function is never called in the tests. Thus igbinary is never used, except for the tests