$i is not defined here, that's why the test suite fails...