You don't have to use PHP so there is no reason to mock it. You just know it is shit and you move on. Unfortunately you __have to__ use javascript sometimes (or always) so there is reason to mock it. That's the reason why people always mock JS. It is omnipresent and you have to touch it with your bare hands.