diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/extension/metadata_manager_test.php | 22 | ||||
-rw-r--r-- | tests/functional/extension_acp_test.php | 2 | ||||
-rw-r--r-- | tests/functional/metadata_manager_test.php | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php index 95544a6f7c..590f638ddb 100644 --- a/tests/extension/metadata_manager_test.php +++ b/tests/extension/metadata_manager_test.php @@ -97,7 +97,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case } catch(\phpbb\extension\exception $e){} - $this->assertEquals((string) $e, 'The required file does not exist: ' . $this->phpbb_root_path . $this->extension_manager->get_extension_path($ext_name) . 'composer.json'); + $this->assertEquals((string) $e, $this->user->lang('FILE_NOT_FOUND', $this->phpbb_root_path . $this->extension_manager->get_extension_path($ext_name) . 'composer.json')); } // Should be the same as a direct json_decode of the composer.json file @@ -136,7 +136,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case } catch(\phpbb\extension\exception $e) { - $this->assertEquals((string) $e, 'Required meta field \'name\' has not been set.'); + $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'name')); } try @@ -147,7 +147,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case } catch(\phpbb\extension\exception $e) { - $this->assertEquals((string) $e, 'Required meta field \'type\' has not been set.'); + $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'type')); } try @@ -158,7 +158,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case } catch(\phpbb\extension\exception $e) { - $this->assertEquals((string) $e, 'Required meta field \'license\' has not been set.'); + $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'license')); } try @@ -169,7 +169,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case } catch(\phpbb\extension\exception $e) { - $this->assertEquals((string) $e, 'Required meta field \'version\' has not been set.'); + $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'version')); } try @@ -180,7 +180,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case } catch(\phpbb\extension\exception $e) { - $this->assertEquals((string) $e, 'Required meta field \'authors\' has not been set.'); + $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'authors')); } $manager->merge_metadata(array( @@ -197,7 +197,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case } catch(\phpbb\extension\exception $e) { - $this->assertEquals((string) $e, 'Required meta field \'author name\' has not been set.'); + $this->assertEquals((string) $e, $this->user->lang('META_FIELD_NOT_SET', 'author name')); } } @@ -224,7 +224,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case } catch(\phpbb\extension\exception $e) { - $this->assertEquals((string) $e, 'Meta field \'name\' is invalid.'); + $this->assertEquals((string) $e, $this->user->lang('META_FIELD_INVALID', 'name')); } try @@ -235,7 +235,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case } catch(\phpbb\extension\exception $e) { - $this->assertEquals((string) $e, 'Meta field \'type\' is invalid.'); + $this->assertEquals((string) $e, $this->user->lang('META_FIELD_INVALID', 'type')); } try @@ -246,7 +246,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case } catch(\phpbb\extension\exception $e) { - $this->assertEquals((string) $e, 'Meta field \'license\' is invalid.'); + $this->assertEquals((string) $e, $this->user->lang('META_FIELD_INVALID', 'license')); } try @@ -257,7 +257,7 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case } catch(\phpbb\extension\exception $e) { - $this->assertEquals((string) $e, 'Meta field \'version\' is invalid.'); + $this->assertEquals((string) $e, $this->user->lang('META_FIELD_INVALID', 'version')); } } diff --git a/tests/functional/extension_acp_test.php b/tests/functional/extension_acp_test.php index 8f0f9c6700..b6dd5db708 100644 --- a/tests/functional/extension_acp_test.php +++ b/tests/functional/extension_acp_test.php @@ -180,7 +180,7 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case { // test2 is not available (error) $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=delete_data_pre&ext_name=test2&sid=' . $this->sid); - $this->assertContains('The required file does not exist', $crawler->filter('.errorbox')->text()); + $this->assertContains($this->lang('FILE_NOT_FOUND', ''), $crawler->filter('.errorbox')->text()); // foo is not disabled (redirect to list) $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=delete_data_pre&ext_name=vendor2%2Ffoo&sid=' . $this->sid); diff --git a/tests/functional/metadata_manager_test.php b/tests/functional/metadata_manager_test.php index 020e9cd142..080822d249 100644 --- a/tests/functional/metadata_manager_test.php +++ b/tests/functional/metadata_manager_test.php @@ -82,6 +82,6 @@ class phpbb_functional_metadata_manager_test extends phpbb_functional_test_case $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=details&ext_name=not%2Fexists&sid=' . $this->sid); // Error message because the files do not exist - $this->assertContains('The required file does not exist:', $crawler->filter('#main')->text()); + $this->assertContains($this->lang('FILE_NOT_FOUND', ''), $crawler->filter('#main')->text()); } } |