How do I run time-dependent database tests with PHPUnit?

I have a PHP application and I want to test the functionality where it records each login attempt in the database, including the time of the login attempt. The SQL statement that I'm trying to test is "INSERT INTO logins VALUES {$email}, {$user_id}, NOW(), {$_SERVER['REMOTE_ADDR']}, {$login_successful}". The problem is, I can't figure out how to use PHPUnit to accomplish this. The issue is that PHPUnit seems to require that I write up my expected data set in an XML file and then compare that file to what's in the database --- but since the value of NOW() depends on when I'm running the test, I can't have a pre-written file to compare against. Has anybody else run into this issue, and what's the best way to work around it? Thanks.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

For those test I directly access the database, read the records and compare the value of the singele fields with the expected ones. For times you can add a delta at which the value is valid.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.