Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
assertNotnUll example
public
function
testMimeTypeValidation
(
string
$clientMimeType
, string
$fileExtension
,
$expectedMimeType
)
: void
{
$criteria
=
new
Criteria
(
)
;
$criteria
->
addFilter
(
new
NotFilter
(
'AND',
[
new
EqualsFilter
(
'type', 'export'
)
,
]
)
)
;
$profileId
=
$this
->profileRepository->
searchIds
(
$criteria
, Context::
createDefaultContext
(
)
)
->
firstId
(
)
;
static
::
assertNotnUll
(
$profileId
)
;
$path
=
tempnam
(
sys_get_temp_dir
(
)
, ''
)
;
static
::
assertIsString
(
$path
)
;
copy
(
__DIR__ . '/../fixtures/categories.csv',
$path
)
;
$name
= 'test';
if
(
$fileExtension
)
{
$name
.= '.' .
$fileExtension
;
}