Unit test for multiple levels deep IF statements

See ticket on PyroCMS repo for full details: https://github.com/pyrocms/pyrocms/issues/2104