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


PHP PHPUnit_Framework_Assert::assertFalse方法代码示例

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


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

示例1: testIsValidAssetName

 public function testIsValidAssetName()
 {
     PHPUnit::assertTrue(Validator::isValidAssetName('MYTOKEN'));
     PHPUnit::assertTrue(Validator::isValidAssetName('A95428956661682202'));
     PHPUnit::assertFalse(Validator::isValidAssetName('ABADTOKEN'));
     PHPUnit::assertTrue(Validator::isValidAssetNames(['MYTOKEN', 'MYTOKENTWO']));
 }
开发者ID:tokenly,项目名称:asset-name-utils,代码行数:7,代码来源:AssetValidationTest.php

示例2: assertSessionDoesntHave

 public function assertSessionDoesntHave($key)
 {
     if (is_array($key)) {
         return $this->assertSessionDoesntHaveAll($key);
     }
     PHPUnit::assertFalse($this->app['session.store']->has($key), "Session contains key: {$key}");
 }
开发者ID:exolnet,项目名称:laravel-test,代码行数:7,代码来源:TestCaseFunctional.php

示例3: processAssert

 /**
  * Assert Link block for downloadable product on front-end
  *
  * @param CatalogProductView $downloadableProductView
  * @param CatalogProductDownloadable $product
  * @param Browser $browser
  * @return void
  */
 public function processAssert(CatalogProductView $downloadableProductView, CatalogProductDownloadable $product, Browser $browser)
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     $linksBlock = $downloadableProductView->getDownloadableViewBlock()->getDownloadableLinksBlock();
     $fields = $product->getData();
     // Title for for Link block
     \PHPUnit_Framework_Assert::assertEquals($linksBlock->getTitleForLinkBlock(), $fields['downloadable_links']['title'], 'Title for for Link block for downloadable product on front-end is not correct.');
     $this->sortDownloadableArray($fields['downloadable_links']['downloadable']['link']);
     foreach ($fields['downloadable_links']['downloadable']['link'] as $index => $link) {
         $index++;
         // Titles for each links
         // Links are displaying according to Sort Order
         \PHPUnit_Framework_Assert::assertEquals($linksBlock->getItemTitle($index), $link['title'], 'Link item ' . $index . ' with title "' . $link['title'] . '" is not visible.');
         // If Links can be Purchase Separately, check-nob is presented near each link
         // If Links CANNOT be Purchase Separately, check-nob is not presented near each link
         if ($fields['downloadable_links']['links_purchased_separately'] == "Yes") {
             \PHPUnit_Framework_Assert::assertTrue($linksBlock->isVisibleItemCheckbox($index), 'Item ' . $index . ' link block CANNOT be Purchase Separately.');
             // Price is equals passed according to fixture
             $link['price'] = sprintf('$%1.2f', $link['price']);
             \PHPUnit_Framework_Assert::assertEquals($linksBlock->getItemPrice($index), $link['price'], 'Link item ' . $index . ' price is not visible.');
         } elseif ($fields['downloadable_links']['links_purchased_separately'] == "No") {
             \PHPUnit_Framework_Assert::assertFalse($linksBlock->isVisibleItemCheckbox($index), 'Item ' . $index . ' link block can be Purchase Separately.');
         }
     }
 }
开发者ID:aiesh,项目名称:magento2,代码行数:33,代码来源:AssertDownloadableLinksData.php

示例4: processAssert

 /**
  * Assert that deleted attribute can't be used for Products' Export
  *
  * @param AdminExportIndex $exportIndex
  * @param CatalogProductAttribute $attribute
  * @param ImportExport $export
  * @return void
  */
 public function processAssert(AdminExportIndex $exportIndex, CatalogProductAttribute $attribute, ImportExport $export)
 {
     $exportIndex->open();
     $exportIndex->getExportForm()->fill($export);
     $filter = ['attribute_code' => $attribute->getAttributeCode()];
     \PHPUnit_Framework_Assert::assertFalse($exportIndex->getFilterExport()->isRowVisible($filter), 'Attribute \'' . $attribute->getFrontendLabel() . '\' is present in Filter export grid');
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:15,代码来源:AssertProductAttributeAbsenceForExport.php

示例5: processAssert

 /**
  * Assert that products' MAP has been applied before checkout.
  *
  * @param CatalogCategory $category
  * @param Customer $customer
  * @param Address $address
  * @param CatalogCategoryView $catalogCategoryView
  * @param CmsIndex $cmsIndex
  * @param CatalogProductView $catalogProductView
  * @param CheckoutCart $cart
  * @param CheckoutOnepage $checkoutOnePage
  * @param array $products
  * @return void
  */
 public function processAssert(CatalogCategory $category, Customer $customer, Address $address, CatalogCategoryView $catalogCategoryView, CmsIndex $cmsIndex, CatalogProductView $catalogProductView, CheckoutCart $cart, CheckoutOnepage $checkoutOnePage, array $products)
 {
     for ($i = 0; $i < count($products); $i++) {
         $cart->getCartBlock()->clearShoppingCart();
         $productName = $products[$i]->getName();
         $cmsIndex->open();
         $cmsIndex->getTopmenu()->selectCategory($category->getName());
         // Check that price is not present on category page.
         $listProductBlock = $catalogCategoryView->getListProductBlock();
         $productPriceBlock = $listProductBlock->getProductPriceBlock($productName);
         $productPriceBlock->clickForPrice();
         \PHPUnit_Framework_Assert::assertFalse($productPriceBlock->getMapBlock()->isPriceVisible(), 'Price is present in MSRP dialog on category page.');
         // Check that price is not present on product page.
         $listProductBlock->openProductViewPage($productName);
         \PHPUnit_Framework_Assert::assertFalse($catalogProductView->getViewBlock()->getPriceBlock()->isRegularPriceVisible(), 'Price is present in View block on product page.');
         // Check that price is not present on cart.
         $catalogProductView->getViewBlock()->addToCart($products[$i]);
         \PHPUnit_Framework_Assert::assertTrue($cart->getCartBlock()->getCartItem($products[$i])->isMsrpVisible(), "MSRP link is not visible in cart.");
         // Check that price is present on review block in onepage checkout page.
         $cart->getCartBlock()->getProceedToCheckoutBlock()->proceedToCheckout();
         $checkoutMethodBlock = $checkoutOnePage->getLoginBlock();
         $billingBlock = $checkoutOnePage->getBillingBlock();
         $paymentMethodBlock = $checkoutOnePage->getPaymentMethodsBlock();
         $shippingBlock = $checkoutOnePage->getShippingMethodBlock();
         $checkoutMethodBlock->guestCheckout();
         $checkoutMethodBlock->clickContinue();
         $billingBlock->fillBilling($address, $customer);
         $billingBlock->clickContinue();
         $shippingBlock->selectShippingMethod(['shipping_service' => 'Flat Rate', 'shipping_method' => 'Fixed']);
         $shippingBlock->clickContinue();
         $paymentMethodBlock->selectPaymentMethod(['method' => 'checkmo']);
         $paymentMethodBlock->clickContinue();
         \PHPUnit_Framework_Assert::assertEquals(number_format($products[$i]->getPrice(), 2), $checkoutOnePage->getReviewBlock()->getTotalBlock()->getData('subtotal'), "Subtotal in checkout one page for {$productName} is not equal to expected.");
     }
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:49,代码来源:AssertProductMapAppliedBeforeCheckout.php

示例6: processAssert

 /**
  * Assert that Wishlist can't be find by another Customer (or guest) via "Wishlist Search".
  *
  * @param CustomerAccountLogout $customerAccountLogout
  * @param CmsIndex $cmsIndex
  * @param CatalogCategoryView $catalogCategoryView
  * @param SearchResult $searchResult
  * @param CatalogCategory $category
  * @param Customer $customer
  * @param Wishlist $wishlist
  * @return void
  */
 public function processAssert(CustomerAccountLogout $customerAccountLogout, CmsIndex $cmsIndex, CatalogCategoryView $catalogCategoryView, SearchResult $searchResult, CatalogCategory $category, Customer $customer, Wishlist $wishlist)
 {
     $customerAccountLogout->open();
     $cmsIndex->open()->getTopmenu()->selectCategory($category->getName());
     $catalogCategoryView->getWishlistSearchBlock()->searchByCustomer($customer);
     \PHPUnit_Framework_Assert::assertFalse($searchResult->getWishlistSearchResultBlock()->isWishlistVisibleInGrid($wishlist), "Multiple wishlist is visible on wishlist search result page.");
 }
开发者ID:MikeTayC,项目名称:magento.dev,代码行数:19,代码来源:AssertMultipleWishlistIsPrivate.php

示例7: processAssert

 /**
  * Assert that video is displayed on category page on Store front.
  *
  * @param CmsIndex $cmsIndex
  * @param CatalogCategoryView $catalogCategoryView
  * @param InjectableFixture $initialProduct
  * @return void
  */
 public function processAssert(CmsIndex $cmsIndex, CatalogCategoryView $catalogCategoryView, InjectableFixture $initialProduct)
 {
     $cmsIndex->open();
     $cmsIndex->getTopmenu()->selectCategoryByName($initialProduct->getCategoryIds()[0]);
     $src = $catalogCategoryView->getListProductBlock()->getProductItem($initialProduct)->getBaseImageSource();
     \PHPUnit_Framework_Assert::assertFalse(strpos($src, '/placeholder/') !== false, 'Video preview image is not displayed on category view when it should.');
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:15,代码来源:AssertVideoCategoryView.php

示例8: processAssert

 /**
  * Assert that deleted attribute can't be added to product template on Product Page via Add Attribute control
  *
  * @param CatalogProductAttribute $productAttribute
  * @param CatalogProductIndex $productGrid
  * @param CatalogProductNew $newProductPage
  * @param CatalogProductEdit $productEdit
  * @return void
  */
 public function processAssert(CatalogProductAttribute $productAttribute, CatalogProductIndex $productGrid, CatalogProductEdit $productEdit, CatalogProductNew $newProductPage)
 {
     $productGrid->open();
     $productGrid->getGridPageActionBlock()->addProduct('simple');
     $productEdit->getForm()->openVariationsTab();
     \PHPUnit_Framework_Assert::assertFalse($newProductPage->getForm()->checkAttributeInVariationsSearchAttributeForm($productAttribute), "Product attribute found in Attribute Search form.");
 }
开发者ID:aiesh,项目名称:magento2,代码行数:16,代码来源:AssertProductAttributeAbsenceInVariationsSearch.php

示例9: processAssert

 /**
  * Assert order is not visible in customer account on frontend
  *
  * @param OrderInjectable $order
  * @param Customer $customer
  * @param CustomerAccountIndex $customerAccountIndex
  * @param OrderHistory $orderHistory
  * @param string $status
  * @return void
  */
 public function processAssert(OrderInjectable $order, Customer $customer, CustomerAccountIndex $customerAccountIndex, OrderHistory $orderHistory, $status)
 {
     $filter = ['id' => $order->getId(), 'status' => $status];
     $this->objectManager->create('Magento\\Customer\\Test\\TestStep\\LoginCustomerOnFrontendStep', ['customer' => $customer])->run();
     $customerAccountIndex->getAccountMenuBlock()->openMenuItem('My Orders');
     \PHPUnit_Framework_Assert::assertFalse($orderHistory->getOrderHistoryBlock()->isVisible() && $orderHistory->getOrderHistoryBlock()->isOrderVisible($filter), 'Order with following data \'' . implode(', ', $filter) . '\' is present in Orders block on frontend.');
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:17,代码来源:AssertOrderNotVisibleOnMyAccount.php

示例10: processAssert

 /**
  * Assert that product rating is not displayed on frontend on product review
  *
  * @param CatalogProductView $catalogProductView
  * @param CatalogProductSimple $product
  * @param Rating $productRating
  * @param BrowserInterface $browser
  * @return void
  */
 public function processAssert(CatalogProductView $catalogProductView, CatalogProductSimple $product, Rating $productRating, BrowserInterface $browser)
 {
     $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
     $catalogProductView->getReviewSummary()->getAddReviewLink()->click();
     $reviewForm = $catalogProductView->getReviewFormBlock();
     \PHPUnit_Framework_Assert::assertFalse($reviewForm->isVisibleRating($productRating), 'Product rating "' . $productRating->getRatingCode() . '" is displayed.');
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:16,代码来源:AssertProductRatingNotInProductPage.php

示例11: testAddTXOsFromReceive

 public function testAddTXOsFromReceive()
 {
     // receiving a transaction adds TXOs
     $txo_repository = $this->app->make('App\\Repositories\\TXORepository');
     // setup monitors
     $payment_address_helper = app('PaymentAddressHelper');
     $receiving_address_one = $payment_address_helper->createSamplePaymentAddressWithoutInitialBalances(null, ['address' => '1JztLWos5K7LsqW5E78EASgiVBaCe6f7cD']);
     // receive unconfirmed transactions
     $parsed_txs = $this->receiveUnconfirmedTransactions(1);
     $loaded_txos = $txo_repository->findAll();
     PHPUnit::assertCount(1, $loaded_txos);
     $loaded_txo = $loaded_txos[0];
     PHPUnit::assertEquals('0000000000000000000000000000000000000000000000000000000000000001', $loaded_txo['txid']);
     PHPUnit::assertEquals(0, $loaded_txo['n']);
     PHPUnit::assertEquals(TXO::UNCONFIRMED, $loaded_txo['type']);
     PHPUnit::assertEquals(400000, $loaded_txo['amount']);
     // confirm the transactions (1)
     $this->sendConfirmationEvents(1, $parsed_txs);
     $loaded_txo = $txo_repository->findAll()[0];
     PHPUnit::assertEquals(TXO::UNCONFIRMED, $loaded_txo['type']);
     PHPUnit::assertFalse($loaded_txo['green']);
     // confirm the transactions (2)
     $this->sendConfirmationEvents(2, $parsed_txs);
     $loaded_txo = $txo_repository->findAll()[0];
     PHPUnit::assertEquals(TXO::CONFIRMED, $loaded_txo['type']);
 }
开发者ID:CryptArc,项目名称:xchain,代码行数:26,代码来源:TXOTest.php

示例12: processAssert

 /**
  * Assert that products are absent in shopping cart.
  *
  * @param CheckoutCart $checkoutCart
  * @param array $products
  * @return void
  */
 public function processAssert(CheckoutCart $checkoutCart, array $products)
 {
     $checkoutCart->open();
     foreach ($products as $product) {
         \PHPUnit_Framework_Assert::assertFalse($checkoutCart->getCartBlock()->getCartItem($product)->isVisible(), 'Product ' . $product->getName() . ' is present in shopping cart.');
     }
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:14,代码来源:AssertProductsAbsentInShoppingCart.php

示例13: processAssert

 /**
  * Assert that the category cannot be accessed from the navigation bar in the frontend
  *
  * @param CmsIndex $cmsIndex
  * @param Category $category
  * @param BrowserInterface $browser
  * @return void
  */
 public function processAssert(CmsIndex $cmsIndex, Category $category, BrowserInterface $browser)
 {
     $cmsIndex->open();
     \PHPUnit_Framework_Assert::assertFalse($cmsIndex->getTopmenu()->isCategoryVisible($category->getName()), 'Category can be accessed from the navigation bar in the frontend.');
     $browser->open($_ENV['app_frontend_url'] . $category->getUrlKey() . '.html');
     \PHPUnit_Framework_Assert::assertEquals(self::NOT_FOUND_MESSAGE, $cmsIndex->getTitleBlock()->getTitle(), 'Wrong page is displayed.');
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:15,代码来源:AssertCategoryIsNotActive.php

示例14: processAssert

 /**
  * Assert that 'Button name' button is absent order page.
  *
  * @param SalesOrderView $salesOrderView
  * @param SalesOrderIndex $orderIndex
  * @param Order $order
  * @param string|null $orderId
  * @return void
  */
 public function processAssert(SalesOrderView $salesOrderView, SalesOrderIndex $orderIndex, Order $order = null, $orderId = null)
 {
     $orderIndex->open();
     $orderId = $orderId == null ? $order->getId() : $orderId;
     $orderIndex->getSalesOrderGrid()->searchAndOpen(['id' => $orderId]);
     \PHPUnit_Framework_Assert::assertFalse($salesOrderView->getPageActions()->isActionButtonVisible($this->buttonName), "'{$this->buttonName}' button is present on order view page.");
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:16,代码来源:AbstractAssertNoButtonOnOrderPage.php

示例15: toBeFalse

 public function toBeFalse()
 {
     if ($this->negate) {
         a::assertNotFalse($this->actual);
     } else {
         a::assertFalse($this->actual);
     }
 }
开发者ID:jasonmccreary,项目名称:expect,代码行数:8,代码来源:Expect.php


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