Skip to content

Commit a5b80fa

Browse files
MAGETWO-35602: Failures in unit tests coverage builds - PersonalInfoTest::testGetCurrentStatus
- added mock for interval because all data providers run before any test for suite
1 parent 94e6406 commit a5b80fa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

app/code/Magento/Customer/Test/Unit/Block/Adminhtml/Edit/Tab/View/PersonalInfoTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,14 @@ public function testGetStoreLastLoginDateTimezone()
165165
*/
166166
public function testGetCurrentStatus($status, $lastLoginAt, $lastVisitAt, $lastLogoutAt)
167167
{
168+
$this->scopeConfig->expects($this->any())
169+
->method('getValue')
170+
->with(
171+
'customer/online_customers/online_minutes_interval',
172+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
173+
)
174+
->willReturn(60); //TODO: it's value mocked because unit tests run data providers before all testsuite
175+
168176
$this->customerLog->expects($this->any())->method('getLastLoginAt')->willReturn($lastLoginAt);
169177
$this->customerLog->expects($this->any())->method('getLastVisitAt')->willReturn($lastVisitAt);
170178
$this->customerLog->expects($this->any())->method('getLastLogoutAt')->willReturn($lastLogoutAt);

0 commit comments

Comments
 (0)