Fix broken foreach in Test
Rename controllersTest to BaseControllerTest
Refactor test function
Remove index function from BaseController
Format code