forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-73785 phpunit: Move more tests to use correct names and namespaces
Applied the following changes to various testcase classes: - Namespaced with component[\level2-API] - Moved to level2-API subdirectory when required. - Fixed incorrect use statements with leading backslash. - Remove file phpdoc block - Remove MOODLE_INTERNAL if not needed. - Changed code to point to global scope when needed. - Fix some relative paths and comments here and there. - All them passing individually. - Complete runs passing too. Special mention to: - When belonging to other components and being valid api: - analytics related tests have been moved to tests/analytics subdir. - backup & restore related tests have been moved to tests/backup subdir. - events related tests have been moved to tests/event subdir. - privacy related tests have been moved to tests/privacy. - task related tests have been moved to tests/task subdir. - Some simple renames, not including the component part anymore (not needed now that they are namespaced): - some xxxlib_test.php have been renamed lib_test.php (when they where testing the corresponding lib.php). - cache stores tests have been all renamed store_test, originally each one had its own name (file_test, apcu_test, redis_test...) - assign feedback tests have been all renamed feedback_test, originally each one had its own name (file_test, editpdf_test...)
- Loading branch information
Showing
87 changed files
with
1,297 additions
and
1,706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,27 +14,21 @@ | |
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Tests for scheduled tasks. | ||
* | ||
* @package tool_dataprivacy | ||
* @copyright 2018 Mihail Geshoski <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
require_once('data_privacy_testcase.php'); | ||
namespace tool_dataprivacy\task; | ||
|
||
use tool_dataprivacy\api; | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
require_once(__DIR__ . '/../data_privacy_testcase.php'); | ||
|
||
/** | ||
* Tests for scheduled tasks. | ||
* | ||
* @package tool_dataprivacy | ||
* @copyright 2018 Mihail Geshoski <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
class tool_dataprivacy_task_testcase extends data_privacy_testcase { | ||
class task_test extends \data_privacy_testcase { | ||
|
||
/** | ||
* Test tearDown. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.