Fixed failing core test.

Previous test was working in browser, but not on phantomjs. It's
been replaced with equivalent that works in both environments.