Fix detecting correct placement of class opening brackets + tests
Fix coding-style for test
Remove failing tests, inline foreach/if not tested in cake either