2121 * @copyright Copyright (c) 2017 Open LMS (https://www.openlms.net)
2222 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2323 */
24-
24+ namespace local_aws_sdk ;
2525use local_aws_sdk \aws_apcu_cache ;
2626use local_aws_sdk \aws_sdk ;
2727
28- defined ('MOODLE_INTERNAL ' ) || die ();
29-
3028/**
3129 * Tests SDK class.
3230 *
3331 * @package local_aws_sdk
3432 * @copyright Copyright (c) 2017 Open LMS (https://www.openlms.net)
3533 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
3634 */
37- class local_aws_sdk_aws_sdk_testcase extends advanced_testcase {
35+ class aws_sdk_test extends \ advanced_testcase {
3836 /**
3937 * Test various use cases for creating config.
4038 *
@@ -56,7 +54,7 @@ public function test_config_from_cfg($cfg, $expected) {
5654 * Test error handling for missing CFG value.
5755 */
5856 public function test_config_from_cfg_missing_cfg () {
59- $ this ->expectException (coding_exception::class);
57+ $ this ->expectException (\ coding_exception::class);
6058 aws_sdk::config_from_cfg ('asdf_asdf_hodor ' );
6159 }
6260
@@ -70,7 +68,7 @@ public function test_config_from_cfg_not_array() {
7068
7169 $ CFG ->phpunit_local_aws_sdk_test = 'hodor ' ;
7270
73- $ this ->expectException (coding_exception::class);
71+ $ this ->expectException (\ coding_exception::class);
7472 aws_sdk::config_from_cfg ('phpunit_local_aws_sdk_test ' );
7573 }
7674
@@ -87,7 +85,7 @@ public function test_config_from_cfg_unknown_cache() {
8785 'credentials_cache ' => 'hodor ' ,
8886 ];
8987
90- $ this ->expectException (coding_exception::class);
88+ $ this ->expectException (\ coding_exception::class);
9189 aws_sdk::config_from_cfg ('phpunit_local_aws_sdk_test ' );
9290 }
9391
0 commit comments