PHP Class Sylius\Behat\Context\Setup\ExchangeRateContext

Author: Jan Góralski ([email protected])
Inheritance: implements Behat\Behat\Context\Context
Show file Open project: sylius/sylius

Public Methods

Method Description
__construct ( Sylius\Behat\Service\SharedStorageInterface $sharedStorage, Sylius\Component\Resource\Factory\FactoryInterface $exchangeRateFactory, Sylius\Component\Currency\Repository\ExchangeRateRepositoryInterface $exchangeRateRepository, Doctrine\Common\Persistence\ObjectManager $entityManager )
theExchangeRateRatioForSourceAndTargetHasChangedTo ( $sourceCurrencyCode, $targetCurrencyCode, $ratio )
thereIsAnExchangeRateWithSourceCurrencyAndTargetCurrency ( Sylius\Component\Currency\Model\CurrencyInterface $sourceCurrency, Sylius\Component\Currency\Model\CurrencyInterface $targetCurrency, $ratio )

Private Methods

Method Description
createExchangeRate ( Sylius\Component\Currency\Model\CurrencyInterface $sourceCurrency, Sylius\Component\Currency\Model\CurrencyInterface $targetCurrency, float $ratio = 1 ) : Sylius\Component\Currency\Model\ExchangeRateInterface
saveExchangeRate ( Sylius\Component\Currency\Model\ExchangeRateInterface $exchangeRate )

Method Details

__construct() public method

public __construct ( Sylius\Behat\Service\SharedStorageInterface $sharedStorage, Sylius\Component\Resource\Factory\FactoryInterface $exchangeRateFactory, Sylius\Component\Currency\Repository\ExchangeRateRepositoryInterface $exchangeRateRepository, Doctrine\Common\Persistence\ObjectManager $entityManager )
$sharedStorage Sylius\Behat\Service\SharedStorageInterface
$exchangeRateFactory Sylius\Component\Resource\Factory\FactoryInterface
$exchangeRateRepository Sylius\Component\Currency\Repository\ExchangeRateRepositoryInterface
$entityManager Doctrine\Common\Persistence\ObjectManager

theExchangeRateRatioForSourceAndTargetHasChangedTo() public method

public theExchangeRateRatioForSourceAndTargetHasChangedTo ( $sourceCurrencyCode, $targetCurrencyCode, $ratio )

thereIsAnExchangeRateWithSourceCurrencyAndTargetCurrency() public method

public thereIsAnExchangeRateWithSourceCurrencyAndTargetCurrency ( Sylius\Component\Currency\Model\CurrencyInterface $sourceCurrency, Sylius\Component\Currency\Model\CurrencyInterface $targetCurrency, $ratio )
$sourceCurrency Sylius\Component\Currency\Model\CurrencyInterface
$targetCurrency Sylius\Component\Currency\Model\CurrencyInterface