--TEST-- FPM: Test excluding URIs from access log --SKIPIF-- --FILE-- expectSuppressableAccessLogEntries($expectSuppressableEntries); $tester->ping(); $tester->expectAccessLog("'GET /ping' 200", suppressable: true); $tester->request()->expectBody('OK'); $tester->expectAccessLog("'GET /log-suppress-output.src.php' 200", suppressable: true); $tester->ping(); $tester->expectAccessLog("'GET /ping' 200", suppressable: true); $tester->request()->expectBody('OK'); $tester->expectAccessLog("'GET /log-suppress-output.src.php' 200", suppressable: true); $tester->ping(); $tester->expectAccessLog("'GET /ping' 200", suppressable: true); $tester->request(query: 'test=output')->expectBody('output'); $tester->expectAccessLog("'GET /log-suppress-output.src.php?test=output' 200", suppressable: false); $tester->ping(); $tester->expectAccessLog("'GET /ping' 200", suppressable: true); $tester->request()->expectBody('OK'); $tester->expectAccessLog("'GET /log-suppress-output.src.php' 200", suppressable: true); $tester->request(query: 'test=output', uri: '/ping')->expectBody('pong', 'text/plain'); $tester->expectAccessLog("'GET /ping?test=output' 200", suppressable: false); $tester->request(headers: ['X_ERROR' => 1])->expectBody('Not OK'); $tester->expectAccessLog("'GET /log-suppress-output.src.php' 500", suppressable: false); $tester->request()->expectBody('OK'); $tester->expectAccessLog("'GET /log-suppress-output.src.php' 200", suppressable: true); $tester->request(query: 'test=output', uri: '/ping')->expectBody('pong', 'text/plain'); $tester->expectAccessLog("'GET /ping?test=output' 200", suppressable: false); $tester->ping(); $tester->expectAccessLog("'GET /ping' 200", suppressable: true); } $src = <<start(['--prefix', $prefix]); $tester->expectLogStartNotices(); doTestCalls($tester, expectSuppressableEntries: true); // Add source file and ping to ignore list $cfg = <<reload($cfg); $tester->expectLogReloadingNotices(); doTestCalls($tester, expectSuppressableEntries: false); $tester->terminate(); $tester->expectLogTerminatingNotices(); $tester->close(); $tester->expectNoFile(FPM\Tester::FILE_EXT_PID, $prefix); $tester->checkAccessLog(); ?> Done --EXPECT-- Done --CLEAN--