File tree Expand file tree Collapse file tree 2 files changed +109
-0
lines changed
lib/internal/Magento/Framework/Model/Test/Unit/Helper Expand file tree Collapse file tree 2 files changed +109
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Copyright 2024 Adobe
4+ * All Rights Reserved.
5+ */
6+ declare (strict_types=1 );
7+
8+ namespace Magento \Framework \Model \Test \Unit \Helper ;
9+
10+ use Magento \Framework \Model \ResourceModel \Db \AbstractDb ;
11+
12+ /**
13+ * Test helper for AbstractDb class
14+ */
15+ class AbstractDbTestHelper extends AbstractDb
16+ {
17+ /**
18+ * Constructor - skip parent constructor to avoid dependencies
19+ */
20+ public function __construct ()
21+ {
22+ // Skip parent constructor to avoid dependency injection issues
23+ }
24+
25+ /**
26+ * Protected construct method
27+ *
28+ * @return void
29+ */
30+ protected function _construct ()
31+ {
32+ // Skip parent implementation
33+ }
34+
35+ /**
36+ * Delete folder
37+ *
38+ * @param string $path
39+ * @return bool
40+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
41+ */
42+ public function deleteFolder ($ path )
43+ {
44+ return true ;
45+ }
46+ }
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Copyright 2024 Adobe
4+ * All Rights Reserved.
5+ */
6+ declare (strict_types=1 );
7+
8+ namespace Magento \Framework \Model \Test \Unit \Helper ;
9+
10+ use Magento \Framework \Model \AbstractModel ;
11+
12+ /**
13+ * Test helper for AbstractModel class
14+ */
15+ class AbstractModelTestHelper extends AbstractModel
16+ {
17+ /**
18+ * @var \Magento\MediaStorage\Model\File\Storage\Database
19+ */
20+ private $ fileMock ;
21+
22+ /**
23+ * Constructor - skip parent constructor to avoid dependencies
24+ */
25+ public function __construct ()
26+ {
27+ // Skip parent constructor to avoid dependency injection issues
28+ }
29+
30+ /**
31+ * Load by filename
32+ *
33+ * @param string $filename
34+ * @return \Magento\MediaStorage\Model\File\Storage\Database
35+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
36+ */
37+ public function loadByFileName ($ filename )
38+ {
39+ return $ this ->fileMock ;
40+ }
41+
42+ /**
43+ * Set file mock
44+ *
45+ * @param \Magento\MediaStorage\Model\File\Storage\Database $fileMock
46+ * @return $this
47+ */
48+ public function setFileMock ($ fileMock )
49+ {
50+ $ this ->fileMock = $ fileMock ;
51+ return $ this ;
52+ }
53+
54+ /**
55+ * Get file mock
56+ *
57+ * @return \Magento\MediaStorage\Model\File\Storage\Database
58+ */
59+ public function getFileMock ()
60+ {
61+ return $ this ->fileMock ;
62+ }
63+ }
You can’t perform that action at this time.
0 commit comments