Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Error Check in Quiz php-arrays-and-control-structures/php-conditionals/switch-statements

Context:

https://teamtreehouse.com/library/php-arrays-and-control-structures/php-conditionals/switch-statements

If I put in my code, which I also put here for reference https://gist.github.com/hputzek/f2d0fbe94497d8350d15898e7f0994c4

the test does not pass.

The reason is, that there is one whitespace too much in between "case" and "author"

case 'author':

This was quite annoying until I found what the error was. It would be nice to improve the testing routine of the quiz in a way that it does not fail because of whitespaces OR clearly state to the users that whitespaces and stuff like that can make a test fail.

Here is a screenshot: Example Screenshot

By removing one whitespace you can make the Quiz pass.

By the way: when I contacted your support part of the answer was:


"I just ran a code check on that code challenge and all tests came back as passing, thus there isn't anything broken and I show that multiple students have passed that Code Challenge in the past 24 hours."

My opinion about that: Sure other students have passed, it's not a problem everybody encounters. And concerning your automated tests: Why shouldn't they pass? They just do not cover my problem lol.