aboutsummaryrefslogtreecommitdiff
path: root/tests/CacheImplementationTest.php
diff options
context:
space:
mode:
authorGravatar Jan Tojnar <jtojnar@gmail.com> 2022-06-07 04:59:22 +0200
committerGravatar GitHub <noreply@github.com> 2022-06-07 04:59:22 +0200
commit19ad2584da58b118d51c28b8a73ec373f474d315 (patch)
tree6b6271d38917f0b6fbbf070a68ea526041959968 /tests/CacheImplementationTest.php
parent190c95fa62131c32d515076374a622c5b80e2d26 (diff)
downloadrss-bridge-19ad2584da58b118d51c28b8a73ec373f474d315.tar.gz
rss-bridge-19ad2584da58b118d51c28b8a73ec373f474d315.tar.zst
rss-bridge-19ad2584da58b118d51c28b8a73ec373f474d315.zip
[NFLRUSBridge] Remove byte-order-mark (#2777)
With UTF-8 byte-order mark in the file, the `ListActionTest::testOutput` would fail after converting tests to PSR-4 namespaces: invalid JSON output: Syntax error Failed asserting that null is not null. This is because ListAction::execute tries to create the bridge objects and, when the files containing the bridge classes are not loaded yet, the autoloader starts including them. Since this happens after output buffering has begun, any text in the PHP file before the `<?php` tag such as the BOM will end up in the buffer to be parsed by `json_decode`. Previously, it worked by chance thanks to some other test including the file before `ListActionTest`. With the restructuring, `Actions\ListActionTest` will run sooner and become responsible for triggering the autoloader. To prevent this in the future, I also disallowed BOM in the coding style.
Diffstat (limited to 'tests/CacheImplementationTest.php')
0 files changed, 0 insertions, 0 deletions