maths / moodle-qtype_stack

Stack question type for Moodle
GNU General Public License v3.0
138 stars 147 forks source link

Missing namespaces within **/tests directories #1095

Closed ScottVerbeek closed 6 months ago

ScottVerbeek commented 6 months ago

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

References: