9
9
use Magento \Backend \Model \Auth as AuthModel ;
10
10
use Magento \Framework \Exception \AuthenticationException ;
11
11
use Magento \Framework \Exception \LocalizedException ;
12
- use Magento \Framework \ObjectManagerInterface ;
13
12
use Magento \TestFramework \Fixture \DataFixture ;
14
- use Magento \TestFramework \Fixture \DataFixtureStorage ;
15
13
use Magento \TestFramework \Fixture \DataFixtureStorageManager ;
16
14
use Magento \TestFramework \Helper \Bootstrap ;
17
15
use Magento \User \Model \User as UserModel ;
24
22
class ValidateUserDateFieldsTest extends TestCase
25
23
{
26
24
27
- /**
28
- * @var DataFixtureStorage
29
- */
30
- private DataFixtureStorage $ fixtures ;
31
-
32
25
/**
33
26
* @var AuthModel
34
27
*/
@@ -46,20 +39,20 @@ protected function setUp(): void
46
39
{
47
40
Bootstrap::getInstance ()->loadArea (\Magento \Backend \App \Area \FrontNameResolver::AREA_CODE );
48
41
$ objectManager = Bootstrap::getObjectManager ();
49
- $ this ->fixtures = DataFixtureStorageManager::getStorage ();
50
42
$ this ->authModel = $ objectManager ->create (AuthModel::class);
51
43
$ this ->userModel = $ objectManager ->create (UserModel::class);
52
44
}
53
45
54
46
/**
55
47
* @throws AuthenticationException
48
+ * @throws LocalizedException
56
49
*/
57
50
#[
58
51
DataFixture(UserDataFixture::class, ['role_id ' => 1 ], 'user ' )
59
52
]
60
53
public function testLogDate ()
61
54
{
62
- $ user = $ this -> fixtures ->get ('user ' );
55
+ $ user = DataFixtureStorageManager:: getStorage () ->get ('user ' );
63
56
$ userName = $ user ->getDataByKey ('username ' );
64
57
$ this ->authModel ->login (
65
58
$ userName ,
0 commit comments