mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/17176] Use BrowserKit instead of Goutte
PHPBB3-17176
This commit is contained in:
parent
cef8aaf1a4
commit
2d7c668a28
2 changed files with 9 additions and 3 deletions
|
@ -62,7 +62,7 @@ class core extends Extension
|
||||||
|
|
||||||
if ($config['require_dev_dependencies'])
|
if ($config['require_dev_dependencies'])
|
||||||
{
|
{
|
||||||
if (!class_exists('Goutte\Client', true))
|
if (!class_exists('Symfony\Component\BrowserKit\HttpBrowser'))
|
||||||
{
|
{
|
||||||
trigger_error(
|
trigger_error(
|
||||||
'Composer development dependencies have not been set up for the ' . $container->getParameter('core.environment') . ' environment yet, run ' .
|
'Composer development dependencies have not been set up for the ' . $container->getParameter('core.environment') . ' environment yet, run ' .
|
||||||
|
|
|
@ -11,12 +11,17 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Symfony\Component\BrowserKit\CookieJar;
|
use Symfony\Component\BrowserKit\CookieJar;
|
||||||
|
use Symfony\Component\BrowserKit\HttpBrowser;
|
||||||
|
use Symfony\Component\HttpClient\HttpClient;
|
||||||
|
|
||||||
require_once __DIR__ . '/mock/phpbb_mock_null_installer_task.php';
|
require_once __DIR__ . '/mock/phpbb_mock_null_installer_task.php';
|
||||||
|
|
||||||
class phpbb_functional_test_case extends phpbb_test_case
|
class phpbb_functional_test_case extends phpbb_test_case
|
||||||
{
|
{
|
||||||
/** @var \Goutte\Client */
|
/** @var HttpClient */
|
||||||
|
protected static $http_client;
|
||||||
|
|
||||||
|
/** @var HttpBrowser */
|
||||||
protected static $client;
|
protected static $client;
|
||||||
protected static $cookieJar;
|
protected static $cookieJar;
|
||||||
protected static $root_url;
|
protected static $root_url;
|
||||||
|
@ -89,7 +94,8 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||||
$this->bootstrap();
|
$this->bootstrap();
|
||||||
|
|
||||||
self::$cookieJar = new CookieJar;
|
self::$cookieJar = new CookieJar;
|
||||||
self::$client = new Goutte\Client(array(), null, self::$cookieJar);
|
self::$http_client = HttpClient::create();
|
||||||
|
self::$client = new HttpBrowser(self::$http_client, null, self::$cookieJar);
|
||||||
|
|
||||||
// Clear the language array so that things
|
// Clear the language array so that things
|
||||||
// that were added in other tests are gone
|
// that were added in other tests are gone
|
||||||
|
|
Loading…
Add table
Reference in a new issue