Skip to content

Commit f718560

Browse files
committed
merge tests from main
1 parent b91ffdd commit f718560

File tree

160 files changed

+1397
-1601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+1397
-1601
lines changed

tests/unit/Base/ClassLoadingTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
class ClassLoadingTest extends TestCase
2424
{
2525
/**
26-
* @group Base
2726
* @dataProvider provideClassExistsData
2827
*/
2928
public function testClassExists(bool $expectedResult, string $class): void

tests/unit/Base/DefaultConfigTest.php

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ class DefaultConfigTest extends TestCase
2727
{
2828
/**
2929
* @dataProvider provideGetStoreConfig
30-
* @group Base
31-
* @group Default_Config
3230
*/
3331
public function testGetStoreConfig(string $expectedResult, string $path, bool|int|Mage_Core_Model_Store|null|string $store = null): void
3432
{

tests/unit/Base/XmlFileLoadingTest.php

-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
class XmlFileLoadingTest extends TestCase
2626
{
2727
/**
28-
* @group Base
2928
* @dataProvider provideXmlFiles
3029
*/
3130
public function testFileLoading(string $filepath): void
@@ -40,7 +39,6 @@ public function testFileLoading(string $filepath): void
4039
}
4140

4241
/**
43-
* @group Base
4442
* @dataProvider provideXmlFiles
4543
*/
4644
public function testXmlReaderIsValid(string $filepath): void

tests/unit/Error/ProcessorTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public function tearDown(): void
3939

4040
/**
4141
* @dataProvider provideGetHostUrl
42-
* @group Error
4342
*/
4443
public function testGetHostUrl(string $expectedResult, array $serverVars): void
4544
{

tests/unit/Mage/Admin/Helper/BlockTest.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ public static function setUpBeforeClass(): void
3333

3434
/**
3535
* @covers Mage_Admin_Helper_Block::isTypeAllowed()
36-
* @group Mage_Admin
37-
* @group Mage_Admin_Helper
36+
* @group Helper
3837
*/
3938
public function testIsTypeAllowed(): void
4039
{
@@ -43,8 +42,7 @@ public function testIsTypeAllowed(): void
4342

4443
/**
4544
* @covers Mage_Admin_Helper_Block::getDisallowedBlockNames()
46-
* @group Mage_Admin
47-
* @group Mage_Admin_Helper
45+
* @group Helper
4846
*/
4947
public function testGetDisallowedBlockNames(): void
5048
{

tests/unit/Mage/Admin/Helper/DataTest.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ public static function setUpBeforeClass(): void
3333

3434
/**
3535
* @covers Mage_Admin_Helper_Data::generateResetPasswordLinkToken()
36-
* @group Mage_Admin
37-
* @group Mage_Admin_Helper
36+
* @group Helper
3837
*/
3938
public function testGenerateResetPasswordLinkToken(): void
4039
{
@@ -43,8 +42,7 @@ public function testGenerateResetPasswordLinkToken(): void
4342

4443
/**
4544
* @covers Mage_Admin_Helper_Data::getResetPasswordLinkExpirationPeriod()
46-
* @group Mage_Admin
47-
* @group Mage_Admin_Helper
45+
* @group Helper
4846
*/
4947
public function testGetResetPasswordLinkExpirationPeriod(): void
5048
{

tests/unit/Mage/Admin/Helper/VariableTest.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ public static function setUpBeforeClass(): void
3333

3434
/**
3535
* @covers Mage_Admin_Helper_Variable::isPathAllowed()
36-
* @group Mage_Admin
37-
* @group Mage_Admin_Helper
36+
* @group Helper
3837
*/
3938
public function testIsPathAllowed(): void
4039
{

tests/unit/Mage/Admin/Model/BlockTest.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ public static function setUpBeforeClass(): void
3939
* @dataProvider provideValidateAdminBlockData
4040
* @param true|array<int, string> $expectedResult
4141
*
42-
* @group Mage_Admin
43-
* @group Mage_Admin_Model
42+
* @group Model
4443
* @throws Exception
4544
*/
4645
public function testValidate(bool|array $expectedResult, array $methods): void
@@ -52,8 +51,7 @@ public function testValidate(bool|array $expectedResult, array $methods): void
5251
}
5352

5453
/**
55-
* @group Mage_Admin
56-
* @group Mage_Admin_Model
54+
* @group Model
5755
*/
5856
public function testIsTypeAllowed(): void
5957
{

tests/unit/Mage/Admin/Model/ConfigTest.php

+4-8
Original file line numberDiff line numberDiff line change
@@ -34,35 +34,31 @@ public static function setUpBeforeClass(): void
3434
}
3535

3636
/**
37-
* @group Mage_Admin
38-
* @group Mage_Admin_Model
37+
* @group Model
3938
*/
4039
public function testGetAclAssert(): void
4140
{
4241
static::assertFalse(self::$subject->getAclAssert(''));
4342
}
4443

4544
/**
46-
* @group Mage_Admin
47-
* @group Mage_Admin_Model
45+
* @group Model
4846
*/
4947
public function testGetAclPrivilegeSet(): void
5048
{
5149
static::assertFalse(self::$subject->getAclPrivilegeSet());
5250
}
5351

5452
/**
55-
* @group Mage_Admin
56-
* @group Mage_Admin_Model
53+
* @group Model
5754
*/
5855
public function testLoadAclResources(): void
5956
{
6057
static::assertInstanceOf(Subject::class, self::$subject->loadAclResources(new Mage_Admin_Model_Acl()));
6158
}
6259

6360
/**
64-
* @group Mage_Admin
65-
* @group Mage_Admin_Model
61+
* @group Model
6662
*/
6763
public function testGetAdminhtmlConfig(): void
6864
{

tests/unit/Mage/Admin/Model/UserTest.php

+11-22
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ public static function setUpBeforeClass(): void
3737

3838
/**
3939
* @dataProvider provideAuthenticateData
40-
* @group Mage_Admin
41-
* @group Mage_Admin_Model
40+
* @group Model
4241
* @group runInSeparateProcess
4342
* @runInSeparateProcess
4443
*/
@@ -60,8 +59,7 @@ public function testAuthenticate(bool|string $expectedResult, array $methods): v
6059
/**
6160
* @dataProvider provideValidateAdminUserData
6261
* @param array|true $expectedResult
63-
* @group Mage_Admin
64-
* @group Mage_Admin_Model
62+
* @group Model
6563
*/
6664
public function testValidate($expectedResult, array $methods): void
6765
{
@@ -74,8 +72,7 @@ public function testValidate($expectedResult, array $methods): void
7472

7573

7674
/**
77-
* @group Mage_Admin
78-
* @group Mage_Admin_Model
75+
* @group Model
7976
*/
8077
public function testValidateCurrentPassword(): void
8178
{
@@ -84,26 +81,23 @@ public function testValidateCurrentPassword(): void
8481
}
8582

8683
/**
87-
* @group Mage_Admin
88-
* @group Mage_Admin_Model
84+
* @group Model
8985
*/
9086
public function testLoadByUsername(): void
9187
{
9288
static::assertInstanceOf(Subject::class, self::$subject->loadByUsername('invalid-user'));
9389
}
9490

9591
/**
96-
* @group Mage_Admin
97-
* @group Mage_Admin_Model
92+
* @group Model
9893
*/
9994
public function testHasAssigned2Role(): void
10095
{
10196
static::assertIsArray(self::$subject->hasAssigned2Role(1));
10297
}
10398

10499
/**
105-
* @group Mage_Admin
106-
* @group Mage_Admin_Model
100+
* @group Model
107101
*/
108102
public function testChangeResetPasswordLinkToken(): void
109103
{
@@ -112,8 +106,7 @@ public function testChangeResetPasswordLinkToken(): void
112106

113107
/**
114108
* @dataProvider provideIsResetPasswordLinkTokenExpiredData
115-
* @group Mage_Admin
116-
* @group Mage_Admin_Model
109+
* @group Model
117110
*/
118111
public function testIsResetPasswordLinkTokenExpired(bool $expectedResult, array $methods): void
119112
{
@@ -124,17 +117,15 @@ public function testIsResetPasswordLinkTokenExpired(bool $expectedResult, array
124117
}
125118

126119
/**
127-
* @group Mage_Admin
128-
* @group Mage_Admin_Model
120+
* @group Model
129121
*/
130122
public function testSendPasswordResetConfirmationEmail(): void
131123
{
132124
static::assertInstanceOf(Subject::class, self::$subject->sendPasswordResetConfirmationEmail());
133125
}
134126

135127
/**
136-
* @group Mage_Admin
137-
* @group Mage_Admin_Model
128+
* @group Model
138129
*/
139130
public function testCleanPasswordsValidationData(): void
140131
{
@@ -152,8 +143,7 @@ public function testCleanPasswordsValidationData(): void
152143
}
153144

154145
/**
155-
* @group Mage_Admin
156-
* @group Mage_Admin_Model
146+
* @group Model
157147
*/
158148
public function testGetMinAdminPasswordLength(): void
159149
{
@@ -165,8 +155,7 @@ public function testGetMinAdminPasswordLength(): void
165155
}
166156

167157
/**
168-
* @group Mage_Admin
169-
* @group Mage_Admin_Model
158+
* @group Model
170159
*/
171160
public function testSendAdminNotification(): void
172161
{

tests/unit/Mage/Admin/Model/VariableTest.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ public static function setUpBeforeClass(): void
3737

3838
/**
3939
* @dataProvider provideValidateAdminVariableData
40-
* @group Mage_Admin
41-
* @group Mage_Admin_Model
40+
* @group Model
4241
* @throws Exception
4342
*/
4443
public function testValidate(bool|array $expectedResult, array $methods): void

tests/unit/Mage/AdminNotification/Helper/DataTest.php

+3-6
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,15 @@ public static function setUpBeforeClass(): void
3333
}
3434

3535
/**
36-
* @group Mage_AdminNotification
37-
* @group Mage_AdminNotification_Helper
36+
* @group Helper
3837
*/
3938
public function testGetLatestNotice(): void
4039
{
4140
static::assertInstanceOf(Mage_AdminNotification_Model_Inbox::class, self::$subject->getLatestNotice());
4241
}
4342

4443
/**
45-
* @group Mage_AdminNotification
46-
* @group Mage_AdminNotification_Helper
44+
* @group Helper
4745
*/
4846
public function testGetUnreadNoticeCount(): void
4947
{
@@ -52,8 +50,7 @@ public function testGetUnreadNoticeCount(): void
5250

5351
/**
5452
* @covers Mage_AdminNotification_Helper_Data::getPopupObjectUrl()
55-
* @group Mage_AdminNotification
56-
* @group Mage_AdminNotification_Helper
53+
* @group Helper
5754
*/
5855
public function testGetPopupObjectUrl(): void
5956
{

tests/unit/Mage/AdminNotification/Model/FeedTest.php

+4-8
Original file line numberDiff line numberDiff line change
@@ -32,35 +32,31 @@ public function setUp(): void
3232
}
3333

3434
/**
35-
* @group Mage_AdminNotification
36-
* @group Mage_AdminNotification_Model
35+
* @group Model
3736
*/
3837
public function testGetFeedUrl(): void
3938
{
4039
static::assertIsString(self::$subject->getFeedUrl());
4140
}
4241

4342
/**
44-
* @group Mage_AdminNotification
45-
* @group Mage_AdminNotification_Model
43+
* @group Model
4644
*/
4745
public function testCheckUpdate(): void
4846
{
4947
static::assertInstanceOf(Subject::class, self::$subject->checkUpdate());
5048
}
5149

5250
/**
53-
* @group Mage_AdminNotification
54-
* @group Mage_AdminNotification_Model
51+
* @group Model
5552
*/
5653
public function testGetFeedData(): void
5754
{
5855
static::assertInstanceOf(SimpleXMLElement::class, self::$subject->getFeedData());
5956
}
6057

6158
/**
62-
* @group Mage_AdminNotification
63-
* @group Mage_AdminNotification_Model
59+
* @group Model
6460
*/
6561
public function testGetFeedXml(): void
6662
{

0 commit comments

Comments
 (0)