[ticket/297] Rename version_check method to check to prevent 2nd constructor

B3P-297
This commit is contained in:
Marc Alexander
2014-07-08 16:14:59 +02:00
parent f4fd6f73e0
commit bf7b8eb99b
3 changed files with 4 additions and 4 deletions

View File

@@ -148,7 +148,7 @@ class portal_module
else else
{ {
// only show the mod version check if we are on the General Settings page // only show the mod version check if we are on the General Settings page
$this->version_check->version_check(); $this->version_check->check();
} }
$this->new_config = $this->config; $this->new_config = $this->config;

View File

@@ -67,7 +67,7 @@ class version_check
* @param bool $return_version Yes if current version should be returned * @param bool $return_version Yes if current version should be returned
* @return string Current version if $return_version is set to true * @return string Current version if $return_version is set to true
*/ */
public function version_check($return_version = false) public function check($return_version = false)
{ {
if (!function_exists('get_remote_file')) if (!function_exists('get_remote_file'))
{ {

View File

@@ -39,8 +39,8 @@ class phpbb_functions_version_check_test extends \board3\portal\tests\testframew
public function test_version_check() public function test_version_check()
{ {
$this->assertTrue(true); $this->assertTrue(true);
$this->assertNull($this->version_check->version_check()); $this->assertNull($this->version_check->check());
$this->assertEquals('2.1.0', $this->version_check->version_check(true)); $this->assertEquals('2.1.0', $this->version_check->check(true));
$this->template->assert_equals(array( $this->template->assert_equals(array(
'CURRENT_VERSION' => '2.1.0', 'CURRENT_VERSION' => '2.1.0',
'TITLE' => 'Board3 Portal', 'TITLE' => 'Board3 Portal',