"Natively" add emails to Mail by PHP pipe script
You can do what you ask, but it requires a Mailbox > Rebuild operation. That asks Mail to scan the ~/Library/Mail directory you found and rebuild its email header database from the files it finds there. I doubt you'd find that acceptable.

I'm afraid Gerry's comment above is the right way to go about this: set up a test email account somewhere, use one of the many PHP-to-SMTP methods you can find online, and point Apple Mail at that email account.

Perhaps the simplest, most Apple-like way to achieve that end is with OS X Server. It gives you a configuration UI for the Postfix SMTP mail server built into OS X. Setup through the Server GUI is about as easy as you can hope for. You can create a private user account, and be assured that your test emails won't ever even leave the machine. As cheap as OS X Server is these days, it's pretty much a no-brainer.

If you absolutely have to do this for no cost, you can configure Postfix by hand. The configuration GUI you get with OS X Server is helpful, but not strictly necessary.