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


PHP Customer::getLastname方法代码示例

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


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

示例1: prepareBillingAddress

 /**
  * Prepare billing address data.
  *
  * @param array $data
  * @return array
  */
 protected function prepareBillingAddress(array $data)
 {
     $result = $data;
     $result['firstname'] = $this->customer->getFirstname();
     $result['lastname'] = $this->customer->getLastname();
     return $result;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:13,代码来源:Curl.php

示例2: processAssert

 /**
  * Asserts that customer name in Contact information block and Account info tab matches name in fixture.
  *
  * @param CustomerAccountIndex $customerAccountIndex
  * @param CustomerAccountEdit $customerAccountEdit
  * @param Customer $customer
  * @return void
  */
 public function processAssert(CustomerAccountIndex $customerAccountIndex, CustomerAccountEdit $customerAccountEdit, Customer $customer)
 {
     $customerName = $customer->getFirstname() . " " . $customer->getLastname();
     $customerAccountIndex->open();
     $infoBlock = $customerAccountIndex->getInfoBlock()->getContactInfoContent();
     $infoBlock = explode(PHP_EOL, $infoBlock);
     $nameInDashboard = $infoBlock[0];
     \PHPUnit_Framework_Assert::assertTrue($nameInDashboard == $customerName, 'Customer name in Contact info block is not matching the fixture.');
     $customerAccountIndex->getInfoBlock()->openEditContactInfo();
     $nameInEdit = $customerAccountEdit->getAccountInfoForm()->getFirstName() . " " . $customerAccountEdit->getAccountInfoForm()->getLastName();
     \PHPUnit_Framework_Assert::assertTrue($nameInEdit == $customerName, 'Customer name on Account info tab is not matching the fixture.');
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:20,代码来源:AssertCustomerNameFrontend.php

示例3: processAssert

 /**
  * Assert customer info in Abandoned Carts report (Reports > Abandoned carts):
  * – name and email
  * – products and qty
  * – created and updated date
  *
  * @param AbandonedCarts $abandonedCarts
  * @param array $products
  * @param Customer $customer
  * @return void
  */
 public function processAssert(AbandonedCarts $abandonedCarts, $products, Customer $customer)
 {
     $abandonedCarts->open();
     $qty = 0;
     foreach ($products as $product) {
         $qty += $product->getCheckoutData()['qty'];
     }
     $filter = ['customer_name' => $customer->getFirstname() . " " . $customer->getLastname(), 'email' => $customer->getEmail(), 'items_count' => count($products), 'items_qty' => $qty, 'created_at' => date('m/j/Y'), 'updated_at' => date('m/j/Y')];
     $abandonedCarts->getGridBlock()->search($filter);
     $filter['created_at'] = date('M j, Y');
     $filter['updated_at'] = date('M j, Y');
     \PHPUnit_Framework_Assert::assertTrue($abandonedCarts->getGridBlock()->isRowVisible($filter, false, false), 'Expected customer info is absent in Abandoned Carts report grid.');
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:24,代码来源:AssertAbandonedCartCustomerInfoResult.php

示例4: prepareFilter

 /**
  * Prepare filter
  *
  * @param Customer $customer
  * @param array $columns
  * @param array $report
  * @return array
  */
 public function prepareFilter(Customer $customer, array $columns, array $report)
 {
     $format = '';
     switch ($report['report_period']) {
         case 'Day':
             $format = 'M j, Y';
             break;
         case 'Month':
             $format = 'j/Y';
             break;
         case 'Year':
             $format = 'Y';
             break;
     }
     return ['date' => date($format), 'customer' => $customer->getFirstname() . ' ' . $customer->getLastname(), 'orders' => $columns['orders'], 'average' => number_format($columns['average'], 2), 'total' => number_format($columns['total'], 2)];
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:24,代码来源:AbstractAssertCustomerOrderReportResult.php

示例5: processAssert

 /**
  * Assert customer is subscribed to newsletter
  *
  * @param Customer $customer
  * @param SubscriberIndex $subscriberIndex
  * @return void
  */
 public function processAssert(Customer $customer, SubscriberIndex $subscriberIndex)
 {
     $filter = ['email' => $customer->getEmail(), 'firstname' => $customer->getFirstname(), 'lastname' => $customer->getLastname(), 'status' => 'Subscribed'];
     $subscriberIndex->open();
     \PHPUnit_Framework_Assert::assertTrue($subscriberIndex->getSubscriberGrid()->isRowVisible($filter), 'Customer with email \'' . $customer->getEmail() . '\' is absent in Newsletter Subscribers grid.');
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:13,代码来源:AssertCustomerIsSubscribedToNewsletter.php

示例6: openReview

 /**
  * Open customer review report
  *
  * @param Customer $customer
  * @return void
  */
 public function openReview(Customer $customer)
 {
     $customerName = $customer->getFirstname() . ' ' . $customer->getLastname();
     $this->_rootElement->find(sprintf($this->searchRow, $customerName), Locator::SELECTOR_XPATH)->click();
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:11,代码来源:Grid.php

示例7: processAssert

 /**
  * Assert that edit page of customer account contains correct title.
  *
  * @param CustomerAccountIndex $pageCustomerIndex
  * @param Customer $customer
  * @return void
  */
 public function processAssert(CustomerAccountIndex $pageCustomerIndex, Customer $customer)
 {
     \PHPUnit_Framework_Assert::assertEquals($customer->getFirstname() . ' ' . $customer->getLastname(), $pageCustomerIndex->getTitleBlock()->getTitle(), 'Wrong page title is displayed.');
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:11,代码来源:AssertCustomerBackendFormTitle.php

示例8: processAssert

 /**
  * Assert product reviews qty column in Review Report by Customer grid
  *
  * @param CustomerReportReview $customerReportReview
  * @param Customer $customer
  * @param int $reviewsCount
  * @return void
  */
 public function processAssert(CustomerReportReview $customerReportReview, Customer $customer, $reviewsCount)
 {
     $customerName = $customer->getFirstname() . ' ' . $customer->getLastname();
     $customerReportReview->open();
     \PHPUnit_Framework_Assert::assertEquals($reviewsCount, $customerReportReview->getGridBlock()->getQtyReview($customerName), 'Wrong qty review in Customer Reviews Report grid.');
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:14,代码来源:AssertProductReviewsQtyByCustomer.php


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