A number of files within the tests directories are missing namespaces. Possibly causing a fatal error such as:
Fatal error: Cannot declare class editform_test, because the name is already in use in question/type/stack/tests/editform_test.php on line 32
Should add namespaces where required. Using the tool grep I have been able to identify all .php files in this sub directory that are missing the namespace definition.
# The command
rgrep -L namespace ./tests | grep .php
# The results
./tests/behat/behat_qtype_stack.php
./tests/fixtures/maximacorrectiveparser.class.php
./tests/fixtures/subscriptsfixtures.class.php
./tests/fixtures/test_maxima_configuration.php
./tests/fixtures/answertestfixtures.class.php
./tests/fixtures/ast_filter_test_base.php
./tests/fixtures/equivfixtures.class.php
./tests/fixtures/inputfixtures.class.php
./tests/fixtures/numbersfixtures.class.php
./tests/fixtures/test_base.php
./tests/generator/behat_qtype_stack_generator.php
./tests/generator/lib.php
./tests/api_tests_stateful.test.php # Should be renamed, and namespace required.
./tests/editform_test.php # Namespace required.
./tests/restore_logic_test.php # Namespace required.
./tests/helper.php
A number of files within the tests directories are missing namespaces. Possibly causing a fatal error such as:
Should add namespaces where required. Using the tool
grep
I have been able to identify all .php files in this sub directory that are missing the namespace definition.References: