FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
drupal-codeception/src/Codeception/TestDrupalKernel.php at 10.x · coldfrontlabs/drupal-codeception · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
coldfrontlabs
/
drupal-codeception
Public
forked from
guncha25/drupal-codeception
Notifications
You must be signed in to change notification settings
Fork
1
Star
0
Code
Pull requests
2
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
drupal-codeception
/
src
/
Codeception
/
TestDrupalKernel.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
47 lines (41 loc) · 1.33 KB
Breadcrumbs
drupal-codeception
/
src
/
Codeception
/
TestDrupalKernel.php
Copy path
File metadata and controls
47 lines (41 loc) · 1.33 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
namespace
Codeception
;
use
Drupal
\
Core
\
DrupalKernel
;
use
Drupal
\
Core
\
Site
\
Settings
;
use
Drupal
\
Core
\
Routing
\
RouteObjectInterface
;
use
Symfony
\
Component
\
HttpFoundation
\
Request
;
use
Symfony
\
Component
\
Routing
\
Route
;
class
TestDrupalKernel
extends
DrupalKernel {
/**
* TestDrupalKernel constructor.
*/
public
function
__construct
(
$
env
,
$
class_loader
,
$
root
){
$
this
->
root
=
$
root
;
parent
::
__construct
(
$
env
,
$
class_loader
);
}
/**
* Boots test environment.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* The current request.
* @param string $sitePath
* The current site path.
*
* @throws \Exception
*/
public
function
bootTestEnvironment
(
$
sitePath
,
Request
$
request
){
static
::
bootEnvironment
();
$
this
->
setSitePath
(
$
sitePath
);
$
this
->
loadLegacyIncludes
();
Settings::
initialize
(
$
this
->
root
,
$
sitePath
,
$
this
->
classLoader
);
$
this
->
boot
();
$
this
->
preHandle
(
$
request
);
if
(
PHP_SAPI
!==
'
cli
'
) {
$
request
->
setSession
(
$
this
->
container
->
get
(
'
session
'
));
}
$
request
->
attributes
->
set
(RouteObjectInterface::
ROUTE_OBJECT
,
new
Route
(
'
<none>
'
));
$
request
->
attributes
->
set
(RouteObjectInterface::
ROUTE_NAME
,
'
<none>
'
);
$
this
->
container
->
get
(
'
request_stack
'
)->
push
(
$
request
);
$
this
->
container
->
get
(
'
router.request_context
'
)->
fromRequest
(
$
request
);
}
}
Back
|
FazBrowse Home
|
New Git URL