Fix a race condition problem

I've fixed #3857.

And I am sorry. I didn't know my commit was notified to upstream automatically. 
I shouldn't have done force-push.
Ah you are talking about the test file. For test files the function comment snifff is skipped at it would be too much of work to fix them all. You need to update your version of cake's codesniffer to get that update.