Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
AcmeExtension example
$dumper
=
new
PhpDumper
(
$container
)
;
$this
->
assertStringEqualsFile
(
$fixtures
.'/php/services_closure_argument_compiled.php',
$dumper
->
dump
(
)
)
;
}
/** * @dataProvider provideConfig */
public
function
testConfig
(
$file
)
{
$fixtures
=
realpath
(
__DIR__.'/../Fixtures'
)
;
$container
=
new
ContainerBuilder
(
)
;
$container
->
registerExtension
(
new
\
AcmeExtension
(
)
)
;
$loader
=
new
PhpFileLoader
(
$container
,
new
FileLocator
(
)
, 'prod',
new
ConfigBuilderGenerator
(
sys_get_temp_dir
(
)
)
)
;
$loader
->
load
(
$fixtures
.'/config/'.
$file
.'.php'
)
;
$container
->
compile
(
)
;
$dumper
=
new
YamlDumper
(
$container
)
;
$this
->
assertStringMatchesFormatFile
(
$fixtures
.'/config/'.
$file
.'.expected.yml',
$dumper
->
dump
(
)
)
;
}
public
static
function
provideConfig
(
)
{