Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
CurrencyCountryRoundingCollection example
static
::
expectExceptionMessage
(
$exceptionMessage
)
;
}
$currencyRepository
=
new
StaticEntityRepository
(
[
new
CurrencyCollection
(
$entitySearchResult
[
CurrencyDefinition::ENTITY_NAME
]
??
[
]
)
]
)
;
$customerGroupRepository
=
new
StaticEntityRepository
(
[
new
CustomerGroupCollection
(
$entitySearchResult
[
CustomerGroupDefinition::ENTITY_NAME
]
??
[
]
)
]
)
;
$countryRepository
=
new
StaticEntityRepository
(
[
new
CountryCollection
(
$entitySearchResult
[
CountryDefinition::ENTITY_NAME
]
??
[
]
)
]
)
;
$taxRepository
=
new
StaticEntityRepository
(
[
new
TaxCollection
(
$entitySearchResult
[
TaxDefinition::ENTITY_NAME
]
??
[
]
)
]
)
;
$paymentMethodRepository
=
new
StaticEntityRepository
(
[
new
PaymentMethodCollection
(
$entitySearchResult
[
PaymentMethodDefinition::ENTITY_NAME
]
??
[
]
)
]
)
;
$shippingMethodRepository
=
new
StaticEntityRepository
(
[
new
ShippingMethodCollection
(
$entitySearchResult
[
ShippingMethodDefinition::ENTITY_NAME
]
??
[
]
)
]
)
;
$salesChannelRepository
=
new
StaticEntityRepository
(
[
new
SalesChannelCollection
(
$entitySearchResult
[
SalesChannelDefinition::ENTITY_NAME
]
??
[
]
)
]
)
;
$countryStateRepository
=
new
StaticEntityRepository
(
[
new
CountryStateCollection
(
$entitySearchResult
[
CountryStateDefinition::ENTITY_NAME
]
??
[
]
)
]
)
;
$currencyCountryRepository
=
new
StaticEntityRepository
(
[
new
CurrencyCountryRoundingCollection
(
$entitySearchResult
[
CurrencyCountryRoundingDefinition::ENTITY_NAME
]
??
[
]
)
]
)
;
$connection
=
$this
->
createMock
(
Connection::
class
)
;
$connection
->
expects
(
static
::
once
(
)
)
->
method
(
'fetchAssociative'
)
->
willReturn
(
$fetchDataResult
)
;
if
(
$fetchDataResult
=== false
)
{
$connection
->
expects
(
static
::
never
(
)
)
->
method
(
'createQueryBuilder'
)
;
}
if
(
$fetchParentLanguageResult
!== false
)
{
$result
=
$this
->
createMock
(
Result::
class
)
;
$result
->
expects
(
static
::
once
(
)
)
->
method
(
'fetchOne'
)
->
willReturn
(
$fetchParentLanguageResult
)
;