aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/composer.json2
-rw-r--r--phpBB/composer.lock304
-rw-r--r--tests/test_framework/phpbb_ui_test_case.php72
-rw-r--r--tests/ui/permission_roles_test.php12
-rw-r--r--tests/ui/quick_links_test.php6
5 files changed, 306 insertions, 90 deletions
diff --git a/phpBB/composer.json b/phpBB/composer.json
index e91430023d..15cbd2d052 100644
--- a/phpBB/composer.json
+++ b/phpBB/composer.json
@@ -55,7 +55,7 @@
"laravel/homestead": "~2.2",
"phing/phing": "2.4.*",
"phpunit/dbunit": "1.3.*",
- "phpunit/phpunit": "4.1.*",
+ "phpunit/phpunit": "^4.1",
"sami/sami": "1.*",
"squizlabs/php_codesniffer": "2.*",
"symfony/browser-kit": "^2.8",
diff --git a/phpBB/composer.lock b/phpBB/composer.lock
index e550572fb3..70f65a290e 100644
--- a/phpBB/composer.lock
+++ b/phpBB/composer.lock
@@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "067b099cc97334a6a08a77e5648aa260",
- "content-hash": "90198ca524b93a7e915aa6916b2f55af",
+ "hash": "8d03337c5b9f6ae7cc1a26f84ba0270b",
+ "content-hash": "be4cb6437adc268d96f99bcbaad66d03",
"packages": [
{
"name": "bantu/ini-get-wrapper",
@@ -1895,6 +1895,60 @@
],
"packages-dev": [
{
+ "name": "doctrine/instantiator",
+ "version": "1.0.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/instantiator.git",
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3,<8.0-DEV"
+ },
+ "require-dev": {
+ "athletic/athletic": "~0.1.8",
+ "ext-pdo": "*",
+ "ext-phar": "*",
+ "phpunit/phpunit": "~4.0",
+ "squizlabs/php_codesniffer": "~2.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com",
+ "homepage": "http://ocramius.github.com/"
+ }
+ ],
+ "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
+ "homepage": "https://github.com/doctrine/instantiator",
+ "keywords": [
+ "constructor",
+ "instantiate"
+ ],
+ "time": "2015-06-14 21:17:01"
+ },
+ {
"name": "fabpot/goutte",
"version": "v2.0.4",
"source": {
@@ -2179,6 +2233,118 @@
"time": "2012-11-29 21:23:47"
},
{
+ "name": "phpdocumentor/reflection-docblock",
+ "version": "2.0.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
+ "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8",
+ "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
+ "suggest": {
+ "dflydev/markdown": "~1.0",
+ "erusev/parsedown": "~1.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "phpDocumentor": [
+ "src/"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Mike van Riel",
+ "email": "mike.vanriel@naenius.com"
+ }
+ ],
+ "time": "2015-02-03 12:10:50"
+ },
+ {
+ "name": "phpspec/prophecy",
+ "version": "v1.6.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpspec/prophecy.git",
+ "reference": "6c52c2722f8460122f96f86346600e1077ce22cb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb",
+ "reference": "6c52c2722f8460122f96f86346600e1077ce22cb",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/instantiator": "^1.0.2",
+ "php": "^5.3|^7.0",
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
+ "sebastian/comparator": "^1.1",
+ "sebastian/recursion-context": "^1.0|^2.0"
+ },
+ "require-dev": {
+ "phpspec/phpspec": "^2.0",
+ "phpunit/phpunit": "^4.8 || ^5.6.5"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.6.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Prophecy\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Konstantin Kudryashov",
+ "email": "ever.zet@gmail.com",
+ "homepage": "http://everzet.com"
+ },
+ {
+ "name": "Marcello Duarte",
+ "email": "marcello.duarte@gmail.com"
+ }
+ ],
+ "description": "Highly opinionated mocking framework for PHP 5.3+",
+ "homepage": "https://github.com/phpspec/prophecy",
+ "keywords": [
+ "Double",
+ "Dummy",
+ "fake",
+ "mock",
+ "spy",
+ "stub"
+ ],
+ "time": "2016-11-21 14:58:47"
+ },
+ {
"name": "phpunit/dbunit",
"version": "1.3.2",
"source": {
@@ -2301,31 +2467,33 @@
},
{
"name": "phpunit/php-file-iterator",
- "version": "1.3.4",
+ "version": "1.4.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb"
+ "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb",
- "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
+ "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4.x-dev"
+ }
+ },
"autoload": {
"classmap": [
- "File/"
+ "src/"
]
},
"notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
"license": [
"BSD-3-Clause"
],
@@ -2342,7 +2510,7 @@
"filesystem",
"iterator"
],
- "time": "2013-10-10 15:34:57"
+ "time": "2016-10-03 07:40:28"
},
{
"name": "phpunit/php-text-template",
@@ -2480,16 +2648,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "4.1.6",
+ "version": "4.8.31",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "241116219bb7e3b8111a36ffd8f37546888738d6"
+ "reference": "98b2b39a520766bec663ff5b7ff1b729db9dbfe3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/241116219bb7e3b8111a36ffd8f37546888738d6",
- "reference": "241116219bb7e3b8111a36ffd8f37546888738d6",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/98b2b39a520766bec663ff5b7ff1b729db9dbfe3",
+ "reference": "98b2b39a520766bec663ff5b7ff1b729db9dbfe3",
"shasum": ""
},
"require": {
@@ -2499,17 +2667,19 @@
"ext-reflection": "*",
"ext-spl": "*",
"php": ">=5.3.3",
- "phpunit/php-code-coverage": "~2.0",
- "phpunit/php-file-iterator": "~1.3.1",
+ "phpspec/prophecy": "^1.3.1",
+ "phpunit/php-code-coverage": "~2.1",
+ "phpunit/php-file-iterator": "~1.4",
"phpunit/php-text-template": "~1.2",
- "phpunit/php-timer": "~1.0.2",
- "phpunit/phpunit-mock-objects": "2.1.5",
- "sebastian/comparator": "~1.0",
- "sebastian/diff": "~1.1",
- "sebastian/environment": "~1.0",
- "sebastian/exporter": "~1.0",
+ "phpunit/php-timer": "^1.0.6",
+ "phpunit/phpunit-mock-objects": "~2.3",
+ "sebastian/comparator": "~1.2.2",
+ "sebastian/diff": "~1.2",
+ "sebastian/environment": "~1.3",
+ "sebastian/exporter": "~1.2",
+ "sebastian/global-state": "~1.0",
"sebastian/version": "~1.0",
- "symfony/yaml": "~2.0"
+ "symfony/yaml": "~2.1|~3.0"
},
"suggest": {
"phpunit/php-invoker": "~1.1"
@@ -2520,7 +2690,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.1.x-dev"
+ "dev-master": "4.8.x-dev"
}
},
"autoload": {
@@ -2529,10 +2699,6 @@
]
},
"notification-url": "https://packagist.org/downloads/",
- "include-path": [
- "",
- "../../symfony/yaml/"
- ],
"license": [
"BSD-3-Clause"
],
@@ -2544,34 +2710,36 @@
}
],
"description": "The PHP Unit Testing framework.",
- "homepage": "http://www.phpunit.de/",
+ "homepage": "https://phpunit.de/",
"keywords": [
"phpunit",
"testing",
"xunit"
],
- "time": "2014-08-17 08:07:02"
+ "time": "2016-12-09 02:45:31"
},
{
"name": "phpunit/phpunit-mock-objects",
- "version": "2.1.5",
+ "version": "2.3.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "7878b9c41edb3afab92b85edf5f0981014a2713a"
+ "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/7878b9c41edb3afab92b85edf5f0981014a2713a",
- "reference": "7878b9c41edb3afab92b85edf5f0981014a2713a",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983",
+ "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983",
"shasum": ""
},
"require": {
+ "doctrine/instantiator": "^1.0.2",
"php": ">=5.3.3",
- "phpunit/php-text-template": "~1.2"
+ "phpunit/php-text-template": "~1.2",
+ "sebastian/exporter": "~1.2"
},
"require-dev": {
- "phpunit/phpunit": "~4.1"
+ "phpunit/phpunit": "~4.4"
},
"suggest": {
"ext-soap": "*"
@@ -2579,7 +2747,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.1.x-dev"
+ "dev-master": "2.3.x-dev"
}
},
"autoload": {
@@ -2588,9 +2756,6 @@
]
},
"notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
"license": [
"BSD-3-Clause"
],
@@ -2607,7 +2772,7 @@
"mock",
"xunit"
],
- "time": "2014-06-12 07:22:15"
+ "time": "2015-10-02 06:51:40"
},
{
"name": "pimple/pimple",
@@ -2644,9 +2809,7 @@
"authors": [
{
"name": "Fabien Potencier",
- "email": "fabien@symfony.com",
- "homepage": "http://fabien.potencier.org",
- "role": "Lead Developer"
+ "email": "fabien@symfony.com"
}
],
"description": "Pimple is a simple Dependency Injection Container for PHP 5.3",
@@ -2948,6 +3111,57 @@
"time": "2016-06-17 09:04:28"
},
{
+ "name": "sebastian/global-state",
+ "version": "1.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/global-state.git",
+ "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
+ "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.2"
+ },
+ "suggest": {
+ "ext-uopz": "*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Snapshotting of global state",
+ "homepage": "http://www.github.com/sebastianbergmann/global-state",
+ "keywords": [
+ "global state"
+ ],
+ "time": "2015-10-12 03:26:01"
+ },
+ {
"name": "sebastian/recursion-context",
"version": "1.0.4",
"source": {
diff --git a/tests/test_framework/phpbb_ui_test_case.php b/tests/test_framework/phpbb_ui_test_case.php
index e3f636679c..b875d3212b 100644
--- a/tests/test_framework/phpbb_ui_test_case.php
+++ b/tests/test_framework/phpbb_ui_test_case.php
@@ -78,14 +78,11 @@ class phpbb_ui_test_case extends phpbb_test_case
self::markTestSkipped('phpbb_functional_url was not set in test_config and wasn\'t set as PHPBB_FUNCTIONAL_URL environment variable either.');
}
- if (!self::$webDriver)
- {
- try {
- $capabilities = DesiredCapabilities::firefox();
- self::$webDriver = RemoteWebDriver::create(self::$host . ':' . self::$port, $capabilities);
- } catch (WebDriverCurlException $e) {
- self::markTestSkipped('PhantomJS webserver is not running.');
- }
+ try {
+ $capabilities = DesiredCapabilities::firefox();
+ self::$webDriver = RemoteWebDriver::create(self::$host . ':' . self::$port, $capabilities);
+ } catch (WebDriverCurlException $e) {
+ self::markTestSkipped('PhantomJS webserver is not running.');
}
if (!self::$already_installed)
@@ -146,9 +143,14 @@ class phpbb_ui_test_case extends phpbb_test_case
}
}
- static public function visit($path)
+ public function getDriver()
+ {
+ return self::$webDriver;
+ }
+
+ public function visit($path)
{
- self::$webDriver->get(self::$root_url . $path);
+ $this->getDriver()->get(self::$root_url . $path);
}
static protected function recreate_database($config)
@@ -157,14 +159,14 @@ class phpbb_ui_test_case extends phpbb_test_case
$db_conn_mgr->recreate_db();
}
- static public function find_element($type, $value)
+ public function find_element($type, $value)
{
- return self::$webDriver->findElement(WebDriverBy::$type($value));
+ return $this->getDriver()->findElement(WebDriverBy::$type($value));
}
- static public function submit($type = 'id', $value = 'submit')
+ public function submit($type = 'id', $value = 'submit')
{
- $element = self::find_element($type, $value);
+ $element = $this->find_element($type, $value);
$element->click();
}
@@ -305,21 +307,21 @@ class phpbb_ui_test_case extends phpbb_test_case
$ext_path = str_replace('/', '%2F', $extension);
$this->visit('adm/index.php?i=acp_extensions&mode=main&action=enable_pre&ext_name=' . $ext_path . '&sid=' . $this->sid);
- $this->assertNotEmpty(count(self::find_element('cssSelector', '.submit-buttons')));
+ $this->assertNotEmpty(count($this->find_element('cssSelector', '.submit-buttons')));
- self::find_element('cssSelector', "input[value='Enable']")->submit();
+ $this->find_element('cssSelector', "input[value='Enable']")->submit();
$this->add_lang('acp/extensions');
try
{
- $meta_refresh = self::find_element('cssSelector', 'meta[http-equiv="refresh"]');
+ $meta_refresh = $this->find_element('cssSelector', 'meta[http-equiv="refresh"]');
// Wait for extension to be fully enabled
while (sizeof($meta_refresh))
{
preg_match('#url=.+/(adm+.+)#', $meta_refresh->getAttribute('content'), $match);
- self::$webDriver->execute(array('method' => 'post', 'url' => $match[1]));
- $meta_refresh = self::find_element('cssSelector', 'meta[http-equiv="refresh"]');
+ $this->getDriver()->execute(array('method' => 'post', 'url' => $match[1]));
+ $meta_refresh = $this->find_element('cssSelector', 'meta[http-equiv="refresh"]');
}
}
catch (\Facebook\WebDriver\Exception\NoSuchElementException $e)
@@ -327,7 +329,7 @@ class phpbb_ui_test_case extends phpbb_test_case
// Probably no refresh triggered
}
- $this->assertContainsLang('EXTENSION_ENABLE_SUCCESS', self::find_element('cssSelector', 'div.successbox')->getText());
+ $this->assertContainsLang('EXTENSION_ENABLE_SUCCESS', $this->find_element('cssSelector', 'div.successbox')->getText());
$this->logout();
}
@@ -415,7 +417,7 @@ class phpbb_ui_test_case extends phpbb_test_case
}
$this->visit('ucp.php?sid=' . $this->sid . '&mode=logout');
- $this->assertContains($this->lang('REGISTER'), self::$webDriver->getPageSource());
+ $this->assertContains($this->lang('REGISTER'), $this->getDriver()->getPageSource());
unset($this->sid);
}
@@ -435,17 +437,17 @@ class phpbb_ui_test_case extends phpbb_test_case
return;
}
- self::$webDriver->manage()->deleteAllCookies();
+ $this->getDriver()->manage()->deleteAllCookies();
$this->visit('adm/index.php?sid=' . $this->sid);
- $this->assertContains($this->lang('LOGIN_ADMIN_CONFIRM'), self::$webDriver->getPageSource());
+ $this->assertContains($this->lang('LOGIN_ADMIN_CONFIRM'), $this->getDriver()->getPageSource());
- self::find_element('cssSelector', 'input[name=username]')->clear()->sendKeys($username);
- self::find_element('cssSelector', 'input[type=password]')->sendKeys($username . $username);
- self::find_element('cssSelector', 'input[name=login]')->click();
+ $this->find_element('cssSelector', 'input[name=username]')->clear()->sendKeys($username);
+ $this->find_element('cssSelector', 'input[type=password]')->sendKeys($username . $username);
+ $this->find_element('cssSelector', 'input[name=login]')->click();
$this->assertContains($this->lang('ADMIN_PANEL'), $this->find_element('cssSelector', 'h1')->getText());
- $cookies = self::$webDriver->manage()->getCookies();
+ $cookies = $this->getDriver()->manage()->getCookies();
// The session id is stored in a cookie that ends with _sid - we assume there is only one such cookie
foreach ($cookies as $cookie)
@@ -550,19 +552,19 @@ class phpbb_ui_test_case extends phpbb_test_case
{
$this->add_lang('ucp');
- self::$webDriver->manage()->deleteAllCookies();
+ $this->getDriver()->manage()->deleteAllCookies();
$this->visit('ucp.php');
- $this->assertContains($this->lang('LOGIN_EXPLAIN_UCP'), self::$webDriver->getPageSource());
+ $this->assertContains($this->lang('LOGIN_EXPLAIN_UCP'), $this->getDriver()->getPageSource());
- self::$webDriver->manage()->deleteAllCookies();
+ $this->getDriver()->manage()->deleteAllCookies();
- self::find_element('cssSelector', 'input[name=username]')->sendKeys($username);
- self::find_element('cssSelector', 'input[name=password]')->sendKeys($username . $username);
- self::find_element('cssSelector', 'input[name=login]')->click();
+ $this->find_element('cssSelector', 'input[name=username]')->sendKeys($username);
+ $this->find_element('cssSelector', 'input[name=password]')->sendKeys($username . $username);
+ $this->find_element('cssSelector', 'input[name=login]')->click();
$this->assertNotContains($this->lang('LOGIN'), $this->find_element('className', 'navbar')->getText());
- $cookies = self::$webDriver->manage()->getCookies();
+ $cookies = $this->getDriver()->manage()->getCookies();
// The session id is stored in a cookie that ends with _sid - we assume there is only one such cookie
foreach ($cookies as $cookie)
@@ -586,6 +588,6 @@ class phpbb_ui_test_case extends phpbb_test_case
// Change the Path to your own settings
$screenshot = time() . ".png";
- self::$webDriver->takeScreenshot($screenshot);
+ $this->getDriver()->takeScreenshot($screenshot);
}
}
diff --git a/tests/ui/permission_roles_test.php b/tests/ui/permission_roles_test.php
index 3501124fc1..de54cc788d 100644
--- a/tests/ui/permission_roles_test.php
+++ b/tests/ui/permission_roles_test.php
@@ -25,19 +25,19 @@ class ui_permission_roles_test extends phpbb_ui_test_case
$this->visit('adm/index.php?i=acp_permissions&mode=setting_forum_local&sid=' . $this->sid);
// Select forums
- $elements = self::find_element('cssSelector', 'select#forum')
+ $elements = $this->find_element('cssSelector', 'select#forum')
->findElements(\Facebook\WebDriver\WebDriverBy::tagName('option'));
foreach ($elements as $element)
{
$element->click();
}
- self::find_element('cssSelector', 'form#select_victim')
+ $this->find_element('cssSelector', 'form#select_victim')
->findElement(\Facebook\WebDriver\WebDriverBy::cssSelector('input[type=submit]'))
->click();
// Select administrators and guests
- $groups_form = self::find_element('cssSelector', 'form#groups');
+ $groups_form = $this->find_element('cssSelector', 'form#groups');
$elements = $groups_form
->findElement(\Facebook\WebDriver\WebDriverBy::cssSelector('select'))
->findElements(\Facebook\WebDriver\WebDriverBy::tagName('option'));
@@ -51,7 +51,7 @@ class ui_permission_roles_test extends phpbb_ui_test_case
}
$groups_form->findElement(\Facebook\WebDriver\WebDriverBy::cssSelector('input[name=submit_edit_options]'))->click();
- $first_fieldset = self::find_element('cssSelector', '#perm11');
+ $first_fieldset = $this->find_element('cssSelector', '#perm11');
$this->assertEquals('none', $first_fieldset->findElement(\Facebook\WebDriver\WebDriverBy::cssSelector('div.dropdown'))->getCSSValue('display'));
$first_fieldset
->findElement(\Facebook\WebDriver\WebDriverBy::cssSelector('span.dropdown-toggle'))
@@ -74,14 +74,14 @@ class ui_permission_roles_test extends phpbb_ui_test_case
$this->assertEquals($this->lang('ROLE_FORUM_LIMITED'), $first_fieldset->findElement(\Facebook\WebDriver\WebDriverBy::cssSelector('span.dropdown-toggle'))->getText());
// Check that admin settings didn't get changed
- $second_fieldset = self::find_element('cssSelector', '#perm10');
+ $second_fieldset = $this->find_element('cssSelector', '#perm10');
$this->assertEquals('none', $second_fieldset->findElement(\Facebook\WebDriver\WebDriverBy::cssSelector('div.dropdown'))->getCSSValue('display'));
// Full access = 14
$this->assertEquals(14, $second_fieldset->findElement(\Facebook\WebDriver\WebDriverBy::cssSelector('input[type=hidden]'))->getAttribute('value'));
$this->assertEquals($this->lang('ROLE_FORUM_FULL'), $second_fieldset->findElement(\Facebook\WebDriver\WebDriverBy::cssSelector('span.dropdown-toggle'))->getText());
// Check that category settings were not modified
- $category_fieldset = self::find_element('cssSelector', '#perm00');
+ $category_fieldset = $this->find_element('cssSelector', '#perm00');
$this->assertEquals('none', $category_fieldset->findElement(\Facebook\WebDriver\WebDriverBy::cssSelector('div.dropdown'))->getCSSValue('display'));
// No settings
$this->assertEquals('', $category_fieldset->findElement(\Facebook\WebDriver\WebDriverBy::cssSelector('input[type=hidden]'))->getAttribute('value'));
diff --git a/tests/ui/quick_links_test.php b/tests/ui/quick_links_test.php
index 582aeafcae..171ef3ca53 100644
--- a/tests/ui/quick_links_test.php
+++ b/tests/ui/quick_links_test.php
@@ -19,8 +19,8 @@ class quick_links_test extends phpbb_ui_test_case
public function test_quick_links()
{
$this->visit('index.php');
- $this->assertEmpty(self::find_element('className', 'dropdown')->getText());
- self::find_element('className', 'dropdown-toggle')->click();
- $this->assertNotNull(self::find_element('className', 'dropdown')->getText());
+ $this->assertEmpty($this->find_element('className', 'dropdown')->getText());
+ $this->find_element('className', 'dropdown-toggle')->click();
+ $this->assertNotNull($this->find_element('className', 'dropdown')->getText());
}
}