Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!8464
Issue 3452511 ProviderRepositoryTest kernel.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Issue 3452511 ProviderRepositoryTest kernel.
issue/drupal-3452511:issue-3452511-ProviderRepositoryTest-kernel
into
11.x
Overview
0
Commits
1
Pipelines
1
Changes
1
Open
Ayush Pandey
requested to merge
issue/drupal-3452511:issue-3452511-ProviderRepositoryTest-kernel
into
11.x
1 year ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Compare
11.x
11.x (HEAD)
and
latest version
latest version
1f3e8dac
1 commit,
1 year ago
1 file
+
15
−
9
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
core/modules/media/tests/src/Unit/ProviderRepositoryTest.php
+
15
−
9
Options
@@ -2,13 +2,13 @@
declare
(
strict_types
=
1
);
namespace
Drupal\Tests\media\
Unit
;
namespace
Drupal\Tests\media\
Kernel
;
use
Drupal\Core\KeyValueStore\KeyValueMemoryFactory
;
use
Drupal\Core\Logger\LoggerChannelFactoryInterface
;
use
Drupal\media\OEmbed\ProviderException
;
use
Drupal\media\OEmbed\ProviderRepository
;
use
Drupal\
Tests\Unit
Test
C
ase
;
use
Drupal\
KernelTests\Kernel
Test
B
ase
;
use
GuzzleHttp\Client
;
use
GuzzleHttp\Handler\MockHandler
;
use
GuzzleHttp\HandlerStack
;
@@ -19,7 +19,14 @@
*
* @group media
*/
class
ProviderRepositoryTest
extends
UnitTestCase
{
class
ProviderRepositoryTest
extends
KernelTestBase
{
/**
* The modules to enable.
*
* @var array
*/
protected
static
$modules
=
[
'media'
,
'key_value'
,
'system'
,
'user'
];
/**
* The provider repository under test.
@@ -62,11 +69,10 @@ class ProviderRepositoryTest extends UnitTestCase {
protected
function
setUp
():
void
{
parent
::
setUp
();
$config_factory
=
$this
->
getConfigFactoryStub
([
'media.settings'
=>
[
'oembed_providers_url'
=>
'https://oembed.com/providers.json'
,
],
]);
// Set up the configuration.
$this
->
config
(
'media.settings'
)
->
set
(
'oembed_providers_url'
,
'https://oembed.com/providers.json'
)
->
save
();
$key_value_factory
=
new
KeyValueMemoryFactory
();
$this
->
keyValue
=
$key_value_factory
->
get
(
'media'
);
@@ -85,7 +91,7 @@ protected function setUp(): void {
]);
$this
->
repository
=
new
ProviderRepository
(
$client
,
$config
_f
actory
,
$
this
->
config
F
actory
()
,
$time
->
reveal
(),
$key_value_factory
,
$logger_factory
->
reveal
()
Loading