mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Rename isResourceOnPage to isSingleResourceOnPage from Crud IndexPage
This commit is contained in:
parent
7697f01c68
commit
8134229c4b
13 changed files with 46 additions and 46 deletions
|
|
@ -127,7 +127,7 @@ final class ManagingChannelsContext implements Context
|
||||||
{
|
{
|
||||||
$this->iWantToBrowseChannels();
|
$this->iWantToBrowseChannels();
|
||||||
|
|
||||||
Assert::true($this->indexPage->isResourceOnPage(
|
Assert::true($this->indexPage->isSingleResourceOnPage(
|
||||||
['name' => $channelName]),
|
['name' => $channelName]),
|
||||||
sprintf('Channel with name %s has not been found.', $channelName)
|
sprintf('Channel with name %s has not been found.', $channelName)
|
||||||
);
|
);
|
||||||
|
|
@ -204,7 +204,7 @@ final class ManagingChannelsContext implements Context
|
||||||
$this->iWantToBrowseChannels();
|
$this->iWantToBrowseChannels();
|
||||||
|
|
||||||
Assert::false(
|
Assert::false(
|
||||||
$this->indexPage->isResourceOnPage([$element => $value]),
|
$this->indexPage->isSingleResourceOnPage([$element => $value]),
|
||||||
sprintf('Channel with %s "%s" was created, but it should not.', $element, $value)
|
sprintf('Channel with %s "%s" was created, but it should not.', $element, $value)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -240,7 +240,7 @@ final class ManagingChannelsContext implements Context
|
||||||
$this->iWantToBrowseChannels();
|
$this->iWantToBrowseChannels();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(
|
$this->indexPage->isSingleResourceOnPage(
|
||||||
[
|
[
|
||||||
'code' => $channel->getCode(),
|
'code' => $channel->getCode(),
|
||||||
'name' => $channelName,
|
'name' => $channelName,
|
||||||
|
|
@ -278,7 +278,7 @@ final class ManagingChannelsContext implements Context
|
||||||
$this->iWantToBrowseChannels();
|
$this->iWantToBrowseChannels();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage([$element => $value]),
|
$this->indexPage->isSingleResourceOnPage([$element => $value]),
|
||||||
sprintf('Channel with %s %s cannot be found.', $element, $value)
|
sprintf('Channel with %s %s cannot be found.', $element, $value)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -356,7 +356,7 @@ final class ManagingChannelsContext implements Context
|
||||||
public function thisChannelShouldNoLongerExistInTheRegistry($channelName)
|
public function thisChannelShouldNoLongerExistInTheRegistry($channelName)
|
||||||
{
|
{
|
||||||
Assert::false(
|
Assert::false(
|
||||||
$this->indexPage->isResourceOnPage(['name' => $channelName]),
|
$this->indexPage->isSingleResourceOnPage(['name' => $channelName]),
|
||||||
sprintf('Channel with name %s exists but should not.', $channelName)
|
sprintf('Channel with name %s exists but should not.', $channelName)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -481,7 +481,7 @@ final class ManagingChannelsContext implements Context
|
||||||
$this->iWantToBrowseChannels();
|
$this->iWantToBrowseChannels();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(
|
$this->indexPage->isSingleResourceOnPage(
|
||||||
[
|
[
|
||||||
'name' => $channel->getName(),
|
'name' => $channel->getName(),
|
||||||
'enabled' => $state,
|
'enabled' => $state,
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ final class ManagingCountriesContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(['code' => $country->getCode()]),
|
$this->indexPage->isSingleResourceOnPage(['code' => $country->getCode()]),
|
||||||
sprintf('Country %s should exist but it does not', $country->getCode())
|
sprintf('Country %s should exist but it does not', $country->getCode())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ final class ManagingCurrenciesContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(['code' => $currency->getCode()]),
|
$this->indexPage->isSingleResourceOnPage(['code' => $currency->getCode()]),
|
||||||
sprintf('Currency %s should exist but it does not.', $currency->getCode())
|
sprintf('Currency %s should exist but it does not.', $currency->getCode())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -250,7 +250,7 @@ final class ManagingCurrenciesContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage([$element => $codeValue]),
|
$this->indexPage->isSingleResourceOnPage([$element => $codeValue]),
|
||||||
sprintf('Currency with %s %s cannot be found.', $element, $codeValue)
|
sprintf('Currency with %s %s cannot be found.', $element, $codeValue)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -276,7 +276,7 @@ final class ManagingCurrenciesContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::false(
|
Assert::false(
|
||||||
$this->indexPage->isResourceOnPage(['name' => $currencyName]),
|
$this->indexPage->isSingleResourceOnPage(['name' => $currencyName]),
|
||||||
sprintf('Currency with name %s was created, but it should not.', $currencyName)
|
sprintf('Currency with name %s was created, but it should not.', $currencyName)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ final class ManagingCustomersContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(['Email' => $customer->getEmail()]),
|
$this->indexPage->isSingleResourceOnPage(['Email' => $customer->getEmail()]),
|
||||||
sprintf('Customer with email %s should exist but it does not.', $customer->getEmail())
|
sprintf('Customer with email %s should exist but it does not.', $customer->getEmail())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -209,7 +209,7 @@ final class ManagingCustomersContext implements Context
|
||||||
public function iShouldSeeTheCustomerInTheList($email)
|
public function iShouldSeeTheCustomerInTheList($email)
|
||||||
{
|
{
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(['Email' => $email]),
|
$this->indexPage->isSingleResourceOnPage(['Email' => $email]),
|
||||||
sprintf('Customer with email %s should exist but it does not.', $email)
|
sprintf('Customer with email %s should exist but it does not.', $email)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -233,7 +233,7 @@ final class ManagingCustomersContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::false(
|
Assert::false(
|
||||||
$this->indexPage->isResourceOnPage(['email' => $email]),
|
$this->indexPage->isSingleResourceOnPage(['email' => $email]),
|
||||||
sprintf('Customer with email %s was created, but it should not.', $email)
|
sprintf('Customer with email %s was created, but it should not.', $email)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -320,7 +320,7 @@ final class ManagingCustomersContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(['email' => $email]),
|
$this->indexPage->isSingleResourceOnPage(['email' => $email]),
|
||||||
sprintf('Customer with email %s cannot be found.', $email)
|
sprintf('Customer with email %s cannot be found.', $email)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ final class ManagingLocalesContext implements Context
|
||||||
*/
|
*/
|
||||||
public function storeShouldBeAvailableInLanguage($name)
|
public function storeShouldBeAvailableInLanguage($name)
|
||||||
{
|
{
|
||||||
$doesLocaleExist = $this->indexPage->isResourceOnPage(['name' => $name]);
|
$doesLocaleExist = $this->indexPage->isSingleResourceOnPage(['name' => $name]);
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$doesLocaleExist,
|
$doesLocaleExist,
|
||||||
sprintf('Locale %s should exist but it does not', $name)
|
sprintf('Locale %s should exist but it does not', $name)
|
||||||
|
|
|
||||||
|
|
@ -216,7 +216,7 @@ final class ManagingPaymentMethodsContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(['name' => $paymentMethodName]),
|
$this->indexPage->isSingleResourceOnPage(['name' => $paymentMethodName]),
|
||||||
sprintf('Payment method with name %s has not been found.', $paymentMethodName)
|
sprintf('Payment method with name %s has not been found.', $paymentMethodName)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -259,7 +259,7 @@ final class ManagingPaymentMethodsContext implements Context
|
||||||
$this->iBrowsePaymentMethods();
|
$this->iBrowsePaymentMethods();
|
||||||
|
|
||||||
Assert::false(
|
Assert::false(
|
||||||
$this->indexPage->isResourceOnPage([$element => $value]),
|
$this->indexPage->isSingleResourceOnPage([$element => $value]),
|
||||||
sprintf('Payment method with %s %s was created, but it should not.', $element, $value)
|
sprintf('Payment method with %s %s was created, but it should not.', $element, $value)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -272,7 +272,7 @@ final class ManagingPaymentMethodsContext implements Context
|
||||||
$this->iBrowsePaymentMethods();
|
$this->iBrowsePaymentMethods();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage([
|
$this->indexPage->isSingleResourceOnPage([
|
||||||
'code' => $paymentMethod->getCode(),
|
'code' => $paymentMethod->getCode(),
|
||||||
'name' => $paymentMethodName,
|
'name' => $paymentMethodName,
|
||||||
]),
|
]),
|
||||||
|
|
@ -341,7 +341,7 @@ final class ManagingPaymentMethodsContext implements Context
|
||||||
public function thisPaymentMethodShouldNoLongerExistInTheRegistry(PaymentMethodInterface $paymentMethod)
|
public function thisPaymentMethodShouldNoLongerExistInTheRegistry(PaymentMethodInterface $paymentMethod)
|
||||||
{
|
{
|
||||||
Assert::false(
|
Assert::false(
|
||||||
$this->indexPage->isResourceOnPage(['code' => $paymentMethod->getCode(), 'name' => $paymentMethod->getName()]),
|
$this->indexPage->isSingleResourceOnPage(['code' => $paymentMethod->getCode(), 'name' => $paymentMethod->getName()]),
|
||||||
sprintf('Payment method %s should no longer exist in the registry', $paymentMethod->getName())
|
sprintf('Payment method %s should no longer exist in the registry', $paymentMethod->getName())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -365,7 +365,7 @@ final class ManagingPaymentMethodsContext implements Context
|
||||||
$this->iBrowsePaymentMethods();
|
$this->iBrowsePaymentMethods();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage([$element => $code]),
|
$this->indexPage->isSingleResourceOnPage([$element => $code]),
|
||||||
sprintf('Payment method with %s %s cannot be found.', $element, $code)
|
sprintf('Payment method with %s %s cannot be found.', $element, $code)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ final class ManagingPromotionsContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(['name' => $promotionName]),
|
$this->indexPage->isSingleResourceOnPage(['name' => $promotionName]),
|
||||||
sprintf('Promotion with name %s has not been found.', $promotionName)
|
sprintf('Promotion with name %s has not been found.', $promotionName)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -212,7 +212,7 @@ final class ManagingPromotionsContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::false(
|
Assert::false(
|
||||||
$this->indexPage->isResourceOnPage([$element => $name]),
|
$this->indexPage->isSingleResourceOnPage([$element => $name]),
|
||||||
sprintf('Promotion with %s "%s" has been created, but it should not.', $element, $name)
|
sprintf('Promotion with %s "%s" has been created, but it should not.', $element, $name)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -225,7 +225,7 @@ final class ManagingPromotionsContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage([$element => $value]),
|
$this->indexPage->isSingleResourceOnPage([$element => $value]),
|
||||||
sprintf('Promotion with %s "%s" cannot be found.', $element, $value)
|
sprintf('Promotion with %s "%s" cannot be found.', $element, $value)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -377,7 +377,7 @@ final class ManagingPromotionsContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::false(
|
Assert::false(
|
||||||
$this->indexPage->isResourceOnPage(['code' => $promotion->getCode()]),
|
$this->indexPage->isSingleResourceOnPage(['code' => $promotion->getCode()]),
|
||||||
sprintf('Promotion with code %s exists but should not.', $promotion->getCode())
|
sprintf('Promotion with code %s exists but should not.', $promotion->getCode())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@ final class ManagingShippingMethodsContext implements Context
|
||||||
$this->iWantToBrowseShippingMethods();
|
$this->iWantToBrowseShippingMethods();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(['name' => $shipmentMethodName]),
|
$this->indexPage->isSingleResourceOnPage(['name' => $shipmentMethodName]),
|
||||||
sprintf('The shipping method with name %s has not been found.', $shipmentMethodName)
|
sprintf('The shipping method with name %s has not been found.', $shipmentMethodName)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -193,7 +193,7 @@ final class ManagingShippingMethodsContext implements Context
|
||||||
$this->iWantToBrowseShippingMethods();
|
$this->iWantToBrowseShippingMethods();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage([$element => $code]),
|
$this->indexPage->isSingleResourceOnPage([$element => $code]),
|
||||||
sprintf('Shipping method with %s %s cannot be founded.', $element, $code)
|
sprintf('Shipping method with %s %s cannot be founded.', $element, $code)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -227,7 +227,7 @@ final class ManagingShippingMethodsContext implements Context
|
||||||
$this->iWantToBrowseShippingMethods();
|
$this->iWantToBrowseShippingMethods();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(
|
$this->indexPage->isSingleResourceOnPage(
|
||||||
[
|
[
|
||||||
'code' => $shippingMethod->getCode(),
|
'code' => $shippingMethod->getCode(),
|
||||||
'name' => $shippingMethodName,
|
'name' => $shippingMethodName,
|
||||||
|
|
@ -270,7 +270,7 @@ final class ManagingShippingMethodsContext implements Context
|
||||||
$this->iWantToBrowseShippingMethods();
|
$this->iWantToBrowseShippingMethods();
|
||||||
|
|
||||||
Assert::false(
|
Assert::false(
|
||||||
$this->indexPage->isResourceOnPage([$element => $name]),
|
$this->indexPage->isSingleResourceOnPage([$element => $name]),
|
||||||
sprintf('Shipping method with %s %s was created, but it should not.', $element, $name)
|
sprintf('Shipping method with %s %s was created, but it should not.', $element, $name)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -383,7 +383,7 @@ final class ManagingShippingMethodsContext implements Context
|
||||||
public function thisShippingMethodShouldNoLongerExistInTheRegistry(ShippingMethodInterface $shippingMethod)
|
public function thisShippingMethodShouldNoLongerExistInTheRegistry(ShippingMethodInterface $shippingMethod)
|
||||||
{
|
{
|
||||||
Assert::false(
|
Assert::false(
|
||||||
$this->indexPage->isResourceOnPage(['code' => $shippingMethod->getCode()]),
|
$this->indexPage->isSingleResourceOnPage(['code' => $shippingMethod->getCode()]),
|
||||||
sprintf('Shipping method with code %s exists but should not.', $shippingMethod->getCode())
|
sprintf('Shipping method with code %s exists but should not.', $shippingMethod->getCode())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -427,7 +427,7 @@ final class ManagingShippingMethodsContext implements Context
|
||||||
$this->iWantToBrowseShippingMethods();
|
$this->iWantToBrowseShippingMethods();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(
|
$this->indexPage->isSingleResourceOnPage(
|
||||||
[
|
[
|
||||||
'name' => $shippingMethod->getName(),
|
'name' => $shippingMethod->getName(),
|
||||||
'enabled' => $state,
|
'enabled' => $state,
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ final class ManagingTaxCategoriesContext implements Context
|
||||||
public function thisTaxCategoryShouldNoLongerExistInTheRegistry(TaxCategoryInterface $taxCategory)
|
public function thisTaxCategoryShouldNoLongerExistInTheRegistry(TaxCategoryInterface $taxCategory)
|
||||||
{
|
{
|
||||||
Assert::false(
|
Assert::false(
|
||||||
$this->indexPage->isResourceOnPage(['code' => $taxCategory->getCode()]),
|
$this->indexPage->isSingleResourceOnPage(['code' => $taxCategory->getCode()]),
|
||||||
sprintf('Tax category with code %s exists but should not.', $taxCategory->getCode())
|
sprintf('Tax category with code %s exists but should not.', $taxCategory->getCode())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -145,7 +145,7 @@ final class ManagingTaxCategoriesContext implements Context
|
||||||
{
|
{
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(['name' => $taxCategoryName]),
|
$this->indexPage->isSingleResourceOnPage(['name' => $taxCategoryName]),
|
||||||
sprintf('Tax category with name %s has not been found.', $taxCategoryName)
|
sprintf('Tax category with name %s has not been found.', $taxCategoryName)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -211,7 +211,7 @@ final class ManagingTaxCategoriesContext implements Context
|
||||||
{
|
{
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(['code' => $taxCategory->getCode(), 'name' => $taxCategoryName]),
|
$this->indexPage->isSingleResourceOnPage(['code' => $taxCategory->getCode(), 'name' => $taxCategoryName]),
|
||||||
sprintf('Tax category name %s was not assigned properly.', $taxCategoryName)
|
sprintf('Tax category name %s was not assigned properly.', $taxCategoryName)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -234,7 +234,7 @@ final class ManagingTaxCategoriesContext implements Context
|
||||||
{
|
{
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage([$element => $code]),
|
$this->indexPage->isSingleResourceOnPage([$element => $code]),
|
||||||
sprintf('Tax category with %s %s cannot be founded.', $element, $code)
|
sprintf('Tax category with %s %s cannot be founded.', $element, $code)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -259,7 +259,7 @@ final class ManagingTaxCategoriesContext implements Context
|
||||||
{
|
{
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
Assert::false(
|
Assert::false(
|
||||||
$this->indexPage->isResourceOnPage([$element => $name]),
|
$this->indexPage->isSingleResourceOnPage([$element => $name]),
|
||||||
sprintf('Tax category with %s %s was created, but it should not.', $element, $name)
|
sprintf('Tax category with %s %s was created, but it should not.', $element, $name)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,7 @@ final class ManagingTaxRateContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(['name' => $taxRateName]),
|
$this->indexPage->isSingleResourceOnPage(['name' => $taxRateName]),
|
||||||
sprintf('Tax rate with name %s has not been found.', $taxRateName)
|
sprintf('Tax rate with name %s has not been found.', $taxRateName)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -183,7 +183,7 @@ final class ManagingTaxRateContext implements Context
|
||||||
public function thisTaxRateShouldNoLongerExistInTheRegistry(TaxRateInterface $taxRate)
|
public function thisTaxRateShouldNoLongerExistInTheRegistry(TaxRateInterface $taxRate)
|
||||||
{
|
{
|
||||||
Assert::false(
|
Assert::false(
|
||||||
$this->indexPage->isResourceOnPage(['code' => $taxRate->getCode()]),
|
$this->indexPage->isSingleResourceOnPage(['code' => $taxRate->getCode()]),
|
||||||
sprintf('Tax rate with code %s exists but should not.', $taxRate->getCode())
|
sprintf('Tax rate with code %s exists but should not.', $taxRate->getCode())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -270,7 +270,7 @@ final class ManagingTaxRateContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage([$element => $code]),
|
$this->indexPage->isSingleResourceOnPage([$element => $code]),
|
||||||
sprintf('Tax rate with %s %s cannot be founded.', $element, $code)
|
sprintf('Tax rate with %s %s cannot be founded.', $element, $code)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -315,7 +315,7 @@ final class ManagingTaxRateContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::false(
|
Assert::false(
|
||||||
$this->indexPage->isResourceOnPage([$element => $name]),
|
$this->indexPage->isSingleResourceOnPage([$element => $name]),
|
||||||
sprintf('Tax rate with %s %s was created, but it should not.', $element, $name)
|
sprintf('Tax rate with %s %s was created, but it should not.', $element, $name)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -346,7 +346,7 @@ final class ManagingTaxRateContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(
|
$this->indexPage->isSingleResourceOnPage(
|
||||||
[
|
[
|
||||||
'code' => $taxRate->getCode(),
|
'code' => $taxRate->getCode(),
|
||||||
$element => $taxRateElement,
|
$element => $taxRateElement,
|
||||||
|
|
|
||||||
|
|
@ -279,7 +279,7 @@ final class ManagingZonesContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(['code' => $code]),
|
$this->indexPage->isSingleResourceOnPage(['code' => $code]),
|
||||||
sprintf('Zone with code %s cannot be found.', $code)
|
sprintf('Zone with code %s cannot be found.', $code)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -305,7 +305,7 @@ final class ManagingZonesContext implements Context
|
||||||
$this->indexPage->open();
|
$this->indexPage->open();
|
||||||
|
|
||||||
Assert::false(
|
Assert::false(
|
||||||
$this->indexPage->isResourceOnPage([$element => $value]),
|
$this->indexPage->isSingleResourceOnPage([$element => $value]),
|
||||||
sprintf('Zone with %s %s was added, but it should not.', $element, $value)
|
sprintf('Zone with %s %s was added, but it should not.', $element, $value)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -349,7 +349,7 @@ final class ManagingZonesContext implements Context
|
||||||
public function thisZoneShouldNoLongerExistInTheRegistry($zoneName)
|
public function thisZoneShouldNoLongerExistInTheRegistry($zoneName)
|
||||||
{
|
{
|
||||||
Assert::false(
|
Assert::false(
|
||||||
$this->indexPage->isResourceOnPage(['name' => $zoneName]),
|
$this->indexPage->isSingleResourceOnPage(['name' => $zoneName]),
|
||||||
sprintf('Zone named %s should no longer exist', $zoneName)
|
sprintf('Zone named %s should no longer exist', $zoneName)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -374,7 +374,7 @@ final class ManagingZonesContext implements Context
|
||||||
public function iShouldSeeTheZoneNamedInTheList(ZoneInterface $zone)
|
public function iShouldSeeTheZoneNamedInTheList(ZoneInterface $zone)
|
||||||
{
|
{
|
||||||
Assert::true(
|
Assert::true(
|
||||||
$this->indexPage->isResourceOnPage(['code' => $zone->getCode(), 'name' => $zone->getName()]),
|
$this->indexPage->isSingleResourceOnPage(['code' => $zone->getCode(), 'name' => $zone->getName()]),
|
||||||
sprintf('Zone named %s should exist in the registry', $zone->getName())
|
sprintf('Zone named %s should exist in the registry', $zone->getName())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ class IndexPage extends SymfonyPage implements IndexPageInterface
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function isResourceOnPage(array $parameters)
|
public function isSingleResourceOnPage(array $parameters)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$rows = $this->tableAccessor->getRowsWithFields($this->getElement('table'), $parameters);
|
$rows = $this->tableAccessor->getRowsWithFields($this->getElement('table'), $parameters);
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ interface IndexPageInterface extends PageInterface
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isResourceOnPage(array $parameters);
|
public function isSingleResourceOnPage(array $parameters);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $parameters
|
* @param array $parameters
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue