@@ -45,33 +45,57 @@ class PersonalInfoTest extends \PHPUnit_Framework_TestCase
45
45
protected function setUp ()
46
46
{
47
47
$ customer = $ this ->getMock (
48
- 'Magento\Customer\Api\Data\CustomerInterface ' , [], [], '' , false
48
+ 'Magento\Customer\Api\Data\CustomerInterface ' ,
49
+ [],
50
+ [],
51
+ '' ,
52
+ false
49
53
);
50
54
$ customer ->expects ($ this ->any ())->method ('getId ' )->willReturn (1 );
51
55
$ customer ->expects ($ this ->any ())->method ('getStoreId ' )->willReturn (1 );
52
56
53
57
$ customerDataFactory = $ this ->getMock (
54
- 'Magento\Customer\Api\Data\CustomerInterfaceFactory ' , ['create ' ], [], '' , false
58
+ 'Magento\Customer\Api\Data\CustomerInterfaceFactory ' ,
59
+ ['create ' ],
60
+ [],
61
+ '' ,
62
+ false
55
63
);
56
64
$ customerDataFactory ->expects ($ this ->any ())->method ('create ' )->willReturn ($ customer );
57
65
58
66
$ backendSession = $ this ->getMock (
59
- 'Magento\Backend\Model\Session ' , ['getCustomerData ' ], [], '' , false
67
+ 'Magento\Backend\Model\Session ' ,
68
+ ['getCustomerData ' ],
69
+ [],
70
+ '' ,
71
+ false
60
72
);
61
73
$ backendSession ->expects ($ this ->any ())->method ('getCustomerData ' )->willReturn (['account ' => []]);
62
74
63
75
$ this ->customerLog = $ this ->getMock (
64
- 'Magento\Customer\Model\Log ' , ['getLastLoginAt ' , 'getLastVisitAt ' , 'getLastLogoutAt ' ], [], '' , false
76
+ 'Magento\Customer\Model\Log ' ,
77
+ ['getLastLoginAt ' , 'getLastVisitAt ' , 'getLastLogoutAt ' ],
78
+ [],
79
+ '' ,
80
+ false
65
81
);
66
82
$ this ->customerLog ->expects ($ this ->any ())->method ('loadByCustomer ' )->willReturnSelf ();
67
83
68
84
$ customerLogger = $ this ->getMock (
69
- 'Magento\Customer\Model\Logger ' , ['get ' ], [], '' , false
85
+ 'Magento\Customer\Model\Logger ' ,
86
+ ['get ' ],
87
+ [],
88
+ '' ,
89
+ false
70
90
);
71
91
$ customerLogger ->expects ($ this ->any ())->method ('get ' )->willReturn ($ this ->customerLog );
72
92
73
93
$ dateTime = $ this ->getMock (
74
- 'Magento\Framework\Stdlib\DateTime ' , ['now ' ], [], '' , false
94
+ 'Magento\Framework\Stdlib\DateTime ' ,
95
+ ['now ' ],
96
+ [],
97
+ '' ,
98
+ false
75
99
);
76
100
$ dateTime ->expects ($ this ->any ())->method ('now ' )->willReturn ('2015-03-04 12:00:00 ' );
77
101
@@ -82,13 +106,14 @@ protected function setUp()
82
106
'' ,
83
107
false
84
108
);
85
- $ this ->localeDate
86
- ->expects ($ this ->any ())
87
- ->method ('getDefaultTimezonePath ' )
88
- ->willReturn ($ this ->pathToDefaultTimezone );
109
+ $ this ->localeDate ->expects ($ this ->any ())->method ('getDefaultTimezonePath ' )->willReturn ($ this ->pathToDefaultTimezone );
89
110
90
111
$ this ->scopeConfig = $ this ->getMock (
91
- 'Magento\Framework\App\Config ' , ['getValue ' ], [], '' , false
112
+ 'Magento\Framework\App\Config ' ,
113
+ ['getValue ' ],
114
+ [],
115
+ '' ,
116
+ false
92
117
);
93
118
94
119
$ objectManagerHelper = new \Magento \TestFramework \Helper \ObjectManager ($ this );
@@ -117,9 +142,7 @@ public function testGetStoreLastLoginDateTimezone()
117
142
)
118
143
->willReturn ($ this ->defaultTimezone );
119
144
120
- $ this ->assertEquals (
121
- $ this ->defaultTimezone , $ this ->block ->getStoreLastLoginDateTimezone ()
122
- );
145
+ $ this ->assertEquals ($ this ->defaultTimezone , $ this ->block ->getStoreLastLoginDateTimezone ());
123
146
}
124
147
125
148
/**
0 commit comments