Skip to content

Commit

Permalink
Merge pull request magento#3896 from magento-arcticfoxes/2.3.1-qwerty-pr
Browse files Browse the repository at this point in the history
[2.3.1-qwerty] Sync with 2.3.1-release
  • Loading branch information
joanhe authored Mar 14, 2019
2 parents bae5a32 + 31533b2 commit 1810260
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 46 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ cache:
- $HOME/node_modules
- $HOME/yarn.lock
before_install:
- curl -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.3.0/elasticsearch-2.3.0.deb && sudo dpkg -i --force-confnew elasticsearch-2.3.0.deb && sudo service elasticsearch restart
- ./dev/travis/before_install.sh
install: composer install --no-interaction
before_script: ./dev/travis/before_script.sh
Expand Down
5 changes: 1 addition & 4 deletions app/code/Magento/Customer/Model/Visitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*
* @package Magento\Customer\Model
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
*/
class Visitor extends \Magento\Framework\Model\AbstractModel
{
Expand Down Expand Up @@ -168,10 +169,6 @@ public function initByRequest($observer)

$this->setLastVisitAt((new \DateTime())->format(\Magento\Framework\Stdlib\DateTime::DATETIME_PHP_FORMAT));

// prevent saving Visitor for safe methods, e.g. GET request
if ($this->requestSafety->isSafeMethod()) {
return $this;
}
if (!$this->getId()) {
$this->setSessionId($this->session->getSessionId());
$this->save();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* @magentoDbIsolation disabled
* @magentoIndexerDimensionMode catalog_product_price website_and_customer_group
* @group indexer_dimension
* @magentoAppArea frontend
*/
class FixedBundlePriceCalculatorWithDimensionTest extends BundlePriceAbstract
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,21 @@ public function loginPostRedirectDataProvider()
];
}

/**
* @magentoDataFixture Magento/Customer/_files/customer.php
* @magentoDataFixture Magento/Customer/_files/customer_address.php
* @magentoAppArea frontend
*/
public function testCheckVisitorModel()
{
/** @var \Magento\Customer\Model\Visitor $visitor */
$visitor = $this->_objectManager->get(\Magento\Customer\Model\Visitor::class);
$this->login(1);
$this->assertNull($visitor->getId());
$this->dispatch('customer/account/index');
$this->assertNotNull($visitor->getId());
}

/**
* @param string $email
* @return void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function setUp()
$contentManager = $this->getMockBuilder(\Magento\Elasticsearch\SearchAdapter\ConnectionManager::class)
->disableOriginalConstructor()
->getMock();
$this->clientMock = $this->getMockBuilder(\Magento\Elasticsearch\Model\Client\Elasticsearch::class)
$this->clientMock = $this->getMockBuilder(\Magento\Elasticsearch6\Model\Client\Elasticsearch::class)
->disableOriginalConstructor()
->getMock();
$contentManager
Expand Down Expand Up @@ -78,7 +78,7 @@ protected function setUp()

/**
* @magentoAppIsolation enabled
* @magentoConfigFixture default/catalog/search/engine elasticsearch
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
* @return void
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Magento\TestFramework\Helper\Bootstrap;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Elasticsearch\SearchAdapter\ConnectionManager;
use Magento\Elasticsearch\Model\Client\Elasticsearch as ElasticsearchClient;
use Magento\Elasticsearch6\Model\Client\Elasticsearch as ElasticsearchClient;
use Magento\Elasticsearch\Model\Config;
use Magento\Elasticsearch\SearchAdapter\SearchIndexNameResolver;

Expand Down Expand Up @@ -95,7 +95,7 @@ private function search($text)
}

/**
* @magentoConfigFixture default/catalog/search/engine elasticsearch
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix composite_product_search
*/
public function testSearchConfigurableProductBySimpleProductName()
Expand All @@ -104,7 +104,7 @@ public function testSearchConfigurableProductBySimpleProductName()
}

/**
* @magentoConfigFixture default/catalog/search/engine elasticsearch
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix composite_product_search
*/
public function testSearchConfigurableProductBySimpleProductAttributeMultiselect()
Expand All @@ -113,7 +113,7 @@ public function testSearchConfigurableProductBySimpleProductAttributeMultiselect
}

/**
* @magentoConfigFixture default/catalog/search/engine elasticsearch
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix composite_product_search
*/
public function testSearchConfigurableProductBySimpleProductAttributeSelect()
Expand All @@ -122,7 +122,7 @@ public function testSearchConfigurableProductBySimpleProductAttributeSelect()
}

/**
* @magentoConfigFixture default/catalog/search/engine elasticsearch
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix composite_product_search
*/
public function testSearchConfigurableProductBySimpleProductAttributeShortDescription()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Magento\TestFramework\Helper\Bootstrap;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Elasticsearch\SearchAdapter\ConnectionManager;
use Magento\Elasticsearch\Model\Client\Elasticsearch as ElasticsearchClient;
use Magento\Elasticsearch6\Model\Client\Elasticsearch as ElasticsearchClient;
use Magento\Elasticsearch\Model\Config;
use Magento\Elasticsearch\SearchAdapter\SearchIndexNameResolver;
use Magento\Indexer\Model\Indexer;
Expand Down Expand Up @@ -87,7 +87,7 @@ protected function setUp()
}

/**
* @magentoConfigFixture default/catalog/search/engine elasticsearch
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix indexerhandlertest
* @return void
*/
Expand All @@ -106,7 +106,7 @@ public function testReindexAll(): void

/**
* @magentoAppIsolation enabled
* @magentoConfigFixture default/catalog/search/engine elasticsearch
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix indexerhandlertest
* @return void
*/
Expand All @@ -131,7 +131,7 @@ public function testReindexRowAfterEdit(): void
}

/**
* @magentoConfigFixture default/catalog/search/engine elasticsearch
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix indexerhandlertest
* @return void
*/
Expand Down Expand Up @@ -170,7 +170,7 @@ public function testReindexRowAfterMassAction(): void
}

/**
* @magentoConfigFixture default/catalog/search/engine elasticsearch
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix indexerhandlertest
* @magentoAppArea adminhtml
* @return void
Expand All @@ -192,7 +192,7 @@ public function testReindexRowAfterDelete(): void
/**
* @magentoDbIsolation enabled
* @magentoAppArea adminhtml
* @magentoConfigFixture default/catalog/search/engine elasticsearch
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix indexerhandlertest
* @magentoDataFixture Magento/Elasticsearch/_files/configurable_products.php
* @return void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected function setUp()
/**
* Test search of all products after full reindex
*
* @magentoConfigFixture default/catalog/search/engine elasticsearch
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix indexerhandlertest_configurable
* @magentoDataFixture Magento/ConfigurableProduct/_files/configurable_products.php
*/
Expand All @@ -82,7 +82,7 @@ public function testSearchAll()
/**
* Test search of specific product after full reindex
*
* @magentoConfigFixture default/catalog/search/engine elasticsearch
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix indexerhandlertest_configurable
* @magentoDataFixture Magento/ConfigurableProduct/_files/configurable_products.php
*/
Expand Down
Loading

0 comments on commit 1810260

Please sign in to comment.