Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
assertValidSchema example
static
::
assertSame
(
200,
$response
->
getStatusCode
(
)
,
print_r
(
$response
->
getContent
(
)
, true
)
)
;
}
public
function
testValidateStoreApiSchema
(
)
: void
{
$infoController
= KernelLifecycleManager::
getKernel
(
)
->
getContainer
(
)
->
get
(
StoreApiInfoController::
class
)
;
$response
=
$infoController
->
info
(
new
Request
(
)
)
;
$schema
=
$response
->
getContent
(
)
;
static
::
assertIsString
(
$schema
)
;
$this
->
assertValidSchema
(
$schema
)
;
}
public
function
testValidateAdminApiSchema
(
)
: void
{
$infoController
= KernelLifecycleManager::
getKernel
(
)
->
getContainer
(
)
->
get
(
InfoController::
class
)
;
$response
=
$infoController
->
info
(
new
Request
(
)
)
;
$schema
=
$response
->
getContent
(
)
;
static
::
assertIsString
(
$schema
)
;
$this
->
assertValidSchema
(
$schema
)
;
}