当前位置: 首页>>代码示例>>PHP>>正文


PHP InjectableFixture::getUrlKey方法代码示例

本文整理汇总了PHP中Magento\Mtf\Fixture\InjectableFixture::getUrlKey方法的典型用法代码示例。如果您正苦于以下问题:PHP InjectableFixture::getUrlKey方法的具体用法?PHP InjectableFixture::getUrlKey怎么用?PHP InjectableFixture::getUrlKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Magento\Mtf\Fixture\InjectableFixture的用法示例。


在下文中一共展示了InjectableFixture::getUrlKey方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: processAssert

 /**
  * Assert that redirect from newCategory/oldProduct is correct to new product.
  *
  * @param InjectableFixture $product
  * @param InjectableFixture $initialProduct
  * @param Browser $browser
  * @param CatalogProductView $catalogProductView
  * @return void
  */
 public function processAssert(InjectableFixture $product, InjectableFixture $initialProduct, Browser $browser, CatalogProductView $catalogProductView)
 {
     $category = $product->getDataFieldConfig('category_ids')['source']->getProductCategory();
     $productUrl = $_ENV['app_frontend_url'] . $category->getUrlKey() . '/' . $initialProduct->getUrlKey() . '.html';
     $browser->open($productUrl);
     \PHPUnit_Framework_Assert::assertEquals($catalogProductView->getViewBlock()->getProductName(), strtoupper($product->getName()));
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:16,代码来源:AssertUrlRewriteUpdatedProductOnFrontend.php

示例2: processAssert

 /**
  * Assertion that tier prices are displayed correctly.
  *
  * @param Browser $browser
  * @param CatalogProductView $catalogProductView
  * @param InjectableFixture $product
  * @return void
  */
 public function processAssert(Browser $browser, CatalogProductView $catalogProductView, InjectableFixture $product)
 {
     //Open product view page
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     //Process assertions
     $this->assertPrice($product, $catalogProductView->getViewBlock());
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:15,代码来源:AssertProductTierPriceOnProductPage.php

示例3: processAssert

 /**
  * Assertion that the product is correctly displayed in cart.
  *
  * @param CatalogProductView $catalogProductView
  * @param InjectableFixture $product
  * @param Browser $browser
  * @param CheckoutCart $checkoutCart
  * @return void
  */
 public function processAssert(CatalogProductView $catalogProductView, InjectableFixture $product, Browser $browser, CheckoutCart $checkoutCart)
 {
     // Add product to cart
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     $catalogProductView->getViewBlock()->addToCart($product);
     // Check price
     $this->assertOnShoppingCart($product, $checkoutCart);
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:17,代码来源:AssertProductInCart.php

示例4: processAssert

 /**
  * Assertion that commodity options are displayed correctly.
  *
  * @param CatalogProductView $catalogProductView
  * @param InjectableFixture $product
  * @param Browser $browser
  * @return void
  */
 public function processAssert(CatalogProductView $catalogProductView, InjectableFixture $product, Browser $browser)
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     $fixtureCustomOptions = $this->prepareOptions($product);
     $formCustomOptions = $catalogProductView->getViewBlock()->getOptions($product)['custom_options'];
     $error = $this->verifyData($fixtureCustomOptions, $formCustomOptions);
     \PHPUnit_Framework_Assert::assertEmpty($error, $error);
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:16,代码来源:AssertProductCustomOptionsOnProductPage.php

示例5: processAssert

 /**
  * Check whether there is an opportunity to compare products using given attribute.
  *
  * @param InjectableFixture $product
  * @param CatalogProductAttribute $attribute
  * @param BrowserInterface $browser
  * @param CatalogProductView $catalogProductView
  * @param CatalogProductCompare $catalogProductCompare
  * @return void
  */
 public function processAssert(InjectableFixture $product, CatalogProductAttribute $attribute, BrowserInterface $browser, CatalogProductView $catalogProductView, CatalogProductCompare $catalogProductCompare)
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     $catalogProductView->getViewBlock()->clickAddToCompare();
     $catalogProductCompare->open();
     $label = $attribute->hasData('manage_frontend_label') ? $attribute->getManageFrontendLabel() : $attribute->getFrontendLabel();
     \PHPUnit_Framework_Assert::assertTrue($catalogProductCompare->getCompareProductsBlock()->isAttributeVisible($label), 'Attribute is absent on product compare page.');
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:18,代码来源:AssertProductAttributeIsComparable.php

示例6: processAssert

 /**
  * Assertion that the product is correctly displayed in cart.
  *
  * @param CatalogProductView $catalogProductView
  * @param InjectableFixture $product
  * @param Browser $browser
  * @param CheckoutCart $checkoutCart
  * @return void
  */
 public function processAssert(CatalogProductView $catalogProductView, InjectableFixture $product, Browser $browser, CheckoutCart $checkoutCart)
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     $catalogProductView->getViewBlock()->addToCart($product);
     $checkoutData = $product->getCheckoutData();
     $price = $checkoutCart->getCartBlock()->getCartItem($product)->getCartItemTypePrice('price');
     \PHPUnit_Framework_Assert::assertEquals($checkoutData['cartItem']['price'], $price, 'Product price in shopping cart is not correct.');
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:17,代码来源:AssertConfigurableProductInCart.php

示例7: processAssert

 /**
  * Assert that displayed product data on product page(front-end) equals passed from fixture:
  * 1. Product Name
  * 2. Price
  * 3. Special price
  * 4. SKU
  * 5. Description
  * 6. Short Description
  *
  * @param Browser $browser
  * @param CatalogProductView $catalogProductView
  * @param InjectableFixture $product
  * @return void
  */
 public function processAssert(Browser $browser, CatalogProductView $catalogProductView, InjectableFixture $product)
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     $this->product = $product;
     $this->productView = $catalogProductView->getViewBlock();
     $this->catalogProductView = $catalogProductView;
     $errors = $this->verify();
     \PHPUnit_Framework_Assert::assertEmpty($errors, "\nFound the following errors:\n" . implode(" \n", $errors));
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:23,代码来源:AssertProductPage.php

示例8: processAssert

 /**
  * Assert that product can be added to active gift registry from shopping cart.
  *
  * @param CatalogProductView $catalogProductView
  * @param CheckoutCart $checkoutCart
  * @param InjectableFixture $product
  * @param GiftRegistry $giftRegistry
  * @param GiftRegistryItems $giftRegistryItems
  * @param BrowserInterface $browser
  * @return void
  */
 public function processAssert(CatalogProductView $catalogProductView, CheckoutCart $checkoutCart, InjectableFixture $product, GiftRegistry $giftRegistry, GiftRegistryItems $giftRegistryItems, BrowserInterface $browser)
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     $catalogProductView->getViewBlock()->addToCart($product);
     $catalogProductView->getMessagesBlock()->waitSuccessMessage();
     $checkoutCart->open();
     $checkoutCart->getGiftRegistryBlock()->addToGiftRegistry($giftRegistry);
     \PHPUnit_Framework_Assert::assertTrue($giftRegistryItems->getGiftRegistryItemsBlock()->isProductInGrid($product), "Product can not be added to active gift registry '{$giftRegistry->getTitle()}' from shopping cart.");
 }
开发者ID:QiuLihua83,项目名称:magento-ee,代码行数:20,代码来源:AssertGiftRegistryActiveInShoppingCart.php

示例9: processAssert

 /**
  * Assert that add view review links are present on product page.
  *
  * @param Browser $browser
  * @param CatalogProductView $catalogProductView
  * @param InjectableFixture $product
  * @param Review $review
  * @return void
  */
 public function processAssert(Browser $browser, CatalogProductView $catalogProductView, InjectableFixture $product, Review $review)
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     // Verify add review link
     \PHPUnit_Framework_Assert::assertTrue($catalogProductView->getReviewViewBlock()->getAddReviewLink()->isVisible(), 'Add review link is not visible on product page.');
     // Verify view review link
     $viewReviewLink = $catalogProductView->getReviewViewBlock()->getViewReviewLink($review);
     \PHPUnit_Framework_Assert::assertTrue($viewReviewLink->isVisible(), 'View review link is not visible on product page.');
     \PHPUnit_Framework_Assert::assertContains('1', $viewReviewLink->getText(), 'There is more than 1 approved review.');
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:19,代码来源:AssertReviewLinksIsPresentOnProductPage.php

示例10: processAssert

 /**
  * Assert that product duplicate is not displayed on front-end.
  *
  * @param InjectableFixture $product
  * @param Browser $browser
  * @param CatalogProductView $catalogProductView
  * @return void
  */
 public function processAssert(InjectableFixture $product, Browser $browser, CatalogProductView $catalogProductView)
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '-1' . '.html');
     \PHPUnit_Framework_Assert::assertFalse($catalogProductView->getViewBlock()->isVisible(), 'Duplicate Product is displayed on frontend.');
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:13,代码来源:AssertProductDuplicateIsNotDisplayingOnFrontend.php

示例11: processAssert

 /**
  * Assert that In Stock status is displayed on product page.
  *
  * @param CatalogProductView $catalogProductView
  * @param Browser $browser
  * @param InjectableFixture $product
  * @return void
  */
 public function processAssert(CatalogProductView $catalogProductView, Browser $browser, InjectableFixture $product)
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     \PHPUnit_Framework_Assert::assertEquals(self::STOCK_AVAILABILITY, $catalogProductView->getViewBlock()->getStockAvailability($product), 'Control "' . self::STOCK_AVAILABILITY . '" is not visible.');
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:13,代码来源:AssertProductInStock.php

示例12: processAssert

 /**
  * Assert that 'Add to Cart' button is absent on product page.
  *
  * @param CatalogProductView $catalogProductView
  * @param InjectableFixture $product
  * @param Browser $browser
  * @return void
  */
 public function processAssert(CatalogProductView $catalogProductView, InjectableFixture $product, Browser $browser)
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     \PHPUnit_Framework_Assert::assertFalse($catalogProductView->getViewBlock()->checkAddToCartButton(), 'Add to Cart button is present on product page');
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:13,代码来源:AssertProductCanNotAddToCart.php

示例13: processAssert

 /**
  * Check whether html tags are using in attribute value.
  * Checked tag structure <b><i>atttribute_default_value</p></i></b>
  *
  * @param InjectableFixture $product
  * @param CatalogProductAttribute $attribute
  * @param CatalogProductView $catalogProductView
  * @param BrowserInterface $browser
  * @throws \Exception
  * @return void
  */
 public function processAssert(InjectableFixture $product, CatalogProductAttribute $attribute, CatalogProductView $catalogProductView, BrowserInterface $browser)
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     \PHPUnit_Framework_Assert::assertTrue($catalogProductView->getAdditionalInformationBlock()->hasHtmlTagInAttributeValue($attribute), 'Attribute is not visible with HTML tags on frontend.');
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:16,代码来源:AssertProductAttributeIsHtmlAllowed.php

示例14: processAssert

 /**
  * Assert that video is absent on product page on Store front.
  *
  * @param BrowserInterface $browser
  * @param CatalogProductView $catalogProductView
  * @param InjectableFixture $initialProduct
  */
 public function processAssert(BrowserInterface $browser, CatalogProductView $catalogProductView, InjectableFixture $initialProduct)
 {
     $browser->open($_ENV['app_frontend_url'] . $initialProduct->getUrlKey() . '.html');
     $catalogProductView->getViewBlock()->isGalleryVisible();
     \PHPUnit_Framework_Assert::assertFalse($catalogProductView->getViewBlock()->isGalleryVisible(), 'Product video is displayed on product view when it should not.');
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:13,代码来源:AssertNoVideoProductView.php

示例15: addProduct

 /**
  * Add product to compare list.
  *
  * @param InjectableFixture $product
  * @return void
  */
 protected function addProduct(InjectableFixture $product)
 {
     $this->browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     $this->catalogProductView->getViewBlock()->clickAddToCompare();
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:11,代码来源:AbstractProductsCompareTest.php


注:本文中的Magento\Mtf\Fixture\InjectableFixture::getUrlKey方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。