21
21
* @copyright Copyright (c) 2017 Open LMS (https://www.openlms.net)
22
22
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23
23
*/
24
-
24
+ namespace local_aws_sdk ;
25
25
use local_aws_sdk \aws_apcu_cache ;
26
26
use local_aws_sdk \aws_sdk ;
27
27
28
- defined ('MOODLE_INTERNAL ' ) || die ();
29
-
30
28
/**
31
29
* Tests SDK class.
32
30
*
33
31
* @package local_aws_sdk
34
32
* @copyright Copyright (c) 2017 Open LMS (https://www.openlms.net)
35
33
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
36
34
*/
37
- class local_aws_sdk_aws_sdk_testcase extends advanced_testcase {
35
+ class aws_sdk_test extends \ advanced_testcase {
38
36
/**
39
37
* Test various use cases for creating config.
40
38
*
@@ -56,7 +54,7 @@ public function test_config_from_cfg($cfg, $expected) {
56
54
* Test error handling for missing CFG value.
57
55
*/
58
56
public function test_config_from_cfg_missing_cfg () {
59
- $ this ->expectException (coding_exception::class);
57
+ $ this ->expectException (\ coding_exception::class);
60
58
aws_sdk::config_from_cfg ('asdf_asdf_hodor ' );
61
59
}
62
60
@@ -70,7 +68,7 @@ public function test_config_from_cfg_not_array() {
70
68
71
69
$ CFG ->phpunit_local_aws_sdk_test = 'hodor ' ;
72
70
73
- $ this ->expectException (coding_exception::class);
71
+ $ this ->expectException (\ coding_exception::class);
74
72
aws_sdk::config_from_cfg ('phpunit_local_aws_sdk_test ' );
75
73
}
76
74
@@ -87,7 +85,7 @@ public function test_config_from_cfg_unknown_cache() {
87
85
'credentials_cache ' => 'hodor ' ,
88
86
];
89
87
90
- $ this ->expectException (coding_exception::class);
88
+ $ this ->expectException (\ coding_exception::class);
91
89
aws_sdk::config_from_cfg ('phpunit_local_aws_sdk_test ' );
92
90
}
93
91
0 commit comments