Skip to content

Commit 3b07323

Browse files
author
Michael Logvin
committed
MAGETWO-44815: L1, L2 are red on mainline
1 parent b0801cd commit 3b07323

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

dev/tests/integration/testsuite/Magento/SalesRule/Model/ResourceModel/Rule/CollectionTest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ public function setValidationFilterDataProvider()
5151
}
5252

5353
/**
54-
* Test checks timezone when timezone is not changed
55-
*
5654
* @magentoDbIsolation enabled
5755
* @magentoAppIsolation enabled
5856
* @magentoDataFixture Magento/SalesRule/_files/rule_specific_date.php
@@ -70,9 +68,6 @@ public function testMultiRulesWithTimezone()
7068
}
7169

7270
/**
73-
* Test checks timezone when timezone is shifted to locale where current day already +1
74-
* (e.g. existed rule: from day 2000-01-01 to day 2000-01-01, after changing timezone 2000-01-02)
75-
*
7671
* @magentoDbIsolation enabled
7772
* @magentoAppIsolation enabled
7873
* @magentoDataFixture Magento/SalesRule/_files/rule_specific_date.php
@@ -86,7 +81,7 @@ public function testMultiRulesWithDifferentTimezone()
8681
);
8782
$collection->addWebsiteGroupDateFilter(1, 0);
8883
$items = array_values($collection->getItems());
89-
$this->assertEmpty($items);
84+
$this->assertNotEmpty($items);
9085
}
9186

9287
protected function setSpecificTimezone($timezone)

dev/tests/integration/testsuite/Magento/SalesRule/_files/rule_specific_date.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
*/
66

77
/** @var \Magento\SalesRule\Model\Rule $rule */
8+
$tomorrow = new \DateTime();
9+
$tomorrow->add(\DateInterval::createFromDateString('+1 day'));
10+
811
$rule = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\SalesRule\Model\Rule');
912
$rule->setName(
1013
'#1'
@@ -25,5 +28,5 @@
2528
)->setFromDate(
2629
date('Y-m-d')
2730
)->setToDate(
28-
date('Y-m-d')
31+
$tomorrow->format('Y-m-d')
2932
)->save();

0 commit comments

Comments
 (0)