Skip to content

Commit 31533b2

Browse files
author
Joan He
committed
Merge remote-tracking branch 'arcticfoxes/pr' into 2.3.1-qwerty-pr
2 parents bae5a32 + 6384b15 commit 31533b2

File tree

9 files changed

+54
-46
lines changed

9 files changed

+54
-46
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ cache:
5454
- $HOME/node_modules
5555
- $HOME/yarn.lock
5656
before_install:
57-
- 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
5857
- ./dev/travis/before_install.sh
5958
install: composer install --no-interaction
6059
before_script: ./dev/travis/before_script.sh

app/code/Magento/Customer/Model/Visitor.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*
1515
* @package Magento\Customer\Model
1616
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
17+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
1718
*/
1819
class Visitor extends \Magento\Framework\Model\AbstractModel
1920
{
@@ -168,10 +169,6 @@ public function initByRequest($observer)
168169

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

171-
// prevent saving Visitor for safe methods, e.g. GET request
172-
if ($this->requestSafety->isSafeMethod()) {
173-
return $this;
174-
}
175172
if (!$this->getId()) {
176173
$this->setSessionId($this->session->getSessionId());
177174
$this->save();

dev/tests/integration/testsuite/Magento/Bundle/Model/Product/FixedBundlePriceCalculatorWithDimensionTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* @magentoDbIsolation disabled
1414
* @magentoIndexerDimensionMode catalog_product_price website_and_customer_group
1515
* @group indexer_dimension
16-
* @magentoAppArea frontend
1716
*/
1817
class FixedBundlePriceCalculatorWithDimensionTest extends BundlePriceAbstract
1918
{

dev/tests/integration/testsuite/Magento/Customer/Controller/AccountTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,21 @@ public function loginPostRedirectDataProvider()
751751
];
752752
}
753753

754+
/**
755+
* @magentoDataFixture Magento/Customer/_files/customer.php
756+
* @magentoDataFixture Magento/Customer/_files/customer_address.php
757+
* @magentoAppArea frontend
758+
*/
759+
public function testCheckVisitorModel()
760+
{
761+
/** @var \Magento\Customer\Model\Visitor $visitor */
762+
$visitor = $this->_objectManager->get(\Magento\Customer\Model\Visitor::class);
763+
$this->login(1);
764+
$this->assertNull($visitor->getId());
765+
$this->dispatch('customer/account/index');
766+
$this->assertNotNull($visitor->getId());
767+
}
768+
754769
/**
755770
* @param string $email
756771
* @return void

dev/tests/integration/testsuite/Magento/Elasticsearch/Elasticsearch5/SearchAdapter/AdapterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function setUp()
4343
$contentManager = $this->getMockBuilder(\Magento\Elasticsearch\SearchAdapter\ConnectionManager::class)
4444
->disableOriginalConstructor()
4545
->getMock();
46-
$this->clientMock = $this->getMockBuilder(\Magento\Elasticsearch\Model\Client\Elasticsearch::class)
46+
$this->clientMock = $this->getMockBuilder(\Magento\Elasticsearch6\Model\Client\Elasticsearch::class)
4747
->disableOriginalConstructor()
4848
->getMock();
4949
$contentManager
@@ -78,7 +78,7 @@ protected function setUp()
7878

7979
/**
8080
* @magentoAppIsolation enabled
81-
* @magentoConfigFixture default/catalog/search/engine elasticsearch
81+
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
8282
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix adaptertest
8383
* @return void
8484
*/

dev/tests/integration/testsuite/Magento/Elasticsearch/Model/Client/ElasticsearchTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Magento\TestFramework\Helper\Bootstrap;
1111
use Magento\Store\Model\StoreManagerInterface;
1212
use Magento\Elasticsearch\SearchAdapter\ConnectionManager;
13-
use Magento\Elasticsearch\Model\Client\Elasticsearch as ElasticsearchClient;
13+
use Magento\Elasticsearch6\Model\Client\Elasticsearch as ElasticsearchClient;
1414
use Magento\Elasticsearch\Model\Config;
1515
use Magento\Elasticsearch\SearchAdapter\SearchIndexNameResolver;
1616

@@ -95,7 +95,7 @@ private function search($text)
9595
}
9696

9797
/**
98-
* @magentoConfigFixture default/catalog/search/engine elasticsearch
98+
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
9999
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix composite_product_search
100100
*/
101101
public function testSearchConfigurableProductBySimpleProductName()
@@ -104,7 +104,7 @@ public function testSearchConfigurableProductBySimpleProductName()
104104
}
105105

106106
/**
107-
* @magentoConfigFixture default/catalog/search/engine elasticsearch
107+
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
108108
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix composite_product_search
109109
*/
110110
public function testSearchConfigurableProductBySimpleProductAttributeMultiselect()
@@ -113,7 +113,7 @@ public function testSearchConfigurableProductBySimpleProductAttributeMultiselect
113113
}
114114

115115
/**
116-
* @magentoConfigFixture default/catalog/search/engine elasticsearch
116+
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
117117
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix composite_product_search
118118
*/
119119
public function testSearchConfigurableProductBySimpleProductAttributeSelect()
@@ -122,7 +122,7 @@ public function testSearchConfigurableProductBySimpleProductAttributeSelect()
122122
}
123123

124124
/**
125-
* @magentoConfigFixture default/catalog/search/engine elasticsearch
125+
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
126126
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix composite_product_search
127127
*/
128128
public function testSearchConfigurableProductBySimpleProductAttributeShortDescription()

dev/tests/integration/testsuite/Magento/Elasticsearch/Model/Indexer/IndexHandlerTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use Magento\TestFramework\Helper\Bootstrap;
1414
use Magento\Store\Model\StoreManagerInterface;
1515
use Magento\Elasticsearch\SearchAdapter\ConnectionManager;
16-
use Magento\Elasticsearch\Model\Client\Elasticsearch as ElasticsearchClient;
16+
use Magento\Elasticsearch6\Model\Client\Elasticsearch as ElasticsearchClient;
1717
use Magento\Elasticsearch\Model\Config;
1818
use Magento\Elasticsearch\SearchAdapter\SearchIndexNameResolver;
1919
use Magento\Indexer\Model\Indexer;
@@ -87,7 +87,7 @@ protected function setUp()
8787
}
8888

8989
/**
90-
* @magentoConfigFixture default/catalog/search/engine elasticsearch
90+
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
9191
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix indexerhandlertest
9292
* @return void
9393
*/
@@ -106,7 +106,7 @@ public function testReindexAll(): void
106106

107107
/**
108108
* @magentoAppIsolation enabled
109-
* @magentoConfigFixture default/catalog/search/engine elasticsearch
109+
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
110110
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix indexerhandlertest
111111
* @return void
112112
*/
@@ -131,7 +131,7 @@ public function testReindexRowAfterEdit(): void
131131
}
132132

133133
/**
134-
* @magentoConfigFixture default/catalog/search/engine elasticsearch
134+
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
135135
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix indexerhandlertest
136136
* @return void
137137
*/
@@ -170,7 +170,7 @@ public function testReindexRowAfterMassAction(): void
170170
}
171171

172172
/**
173-
* @magentoConfigFixture default/catalog/search/engine elasticsearch
173+
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
174174
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix indexerhandlertest
175175
* @magentoAppArea adminhtml
176176
* @return void
@@ -192,7 +192,7 @@ public function testReindexRowAfterDelete(): void
192192
/**
193193
* @magentoDbIsolation enabled
194194
* @magentoAppArea adminhtml
195-
* @magentoConfigFixture default/catalog/search/engine elasticsearch
195+
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
196196
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix indexerhandlertest
197197
* @magentoDataFixture Magento/Elasticsearch/_files/configurable_products.php
198198
* @return void

dev/tests/integration/testsuite/Magento/Elasticsearch/Model/Indexer/ReindexAllTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected function setUp()
6868
/**
6969
* Test search of all products after full reindex
7070
*
71-
* @magentoConfigFixture default/catalog/search/engine elasticsearch
71+
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
7272
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix indexerhandlertest_configurable
7373
* @magentoDataFixture Magento/ConfigurableProduct/_files/configurable_products.php
7474
*/
@@ -82,7 +82,7 @@ public function testSearchAll()
8282
/**
8383
* Test search of specific product after full reindex
8484
*
85-
* @magentoConfigFixture default/catalog/search/engine elasticsearch
85+
* @magentoConfigFixture default/catalog/search/engine elasticsearch6
8686
* @magentoConfigFixture current_store catalog/search/elasticsearch_index_prefix indexerhandlertest_configurable
8787
* @magentoDataFixture Magento/ConfigurableProduct/_files/configurable_products.php
8888
*/

0 commit comments

Comments
 (0)