File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
setup/src/Magento/Setup/Test/Unit/Fixtures Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 12
12
use Magento \Framework \TestFramework \Unit \Helper \ObjectManager ;
13
13
use Magento \Setup \Fixtures \CategoriesFixture ;
14
14
use Magento \Setup \Fixtures \FixtureModel ;
15
+ use Magento \Store \Model \Store ;
15
16
16
17
class CategoriesFixtureTest extends \PHPUnit \Framework \TestCase
17
18
{
@@ -40,7 +41,10 @@ class CategoriesFixtureTest extends \PHPUnit\Framework\TestCase
40
41
*/
41
42
private $ categoryFactoryMock ;
42
43
43
- public function setUp ()
44
+ /**
45
+ * @inhertidoc
46
+ */
47
+ protected function setUp ()
44
48
{
45
49
$ this ->fixtureModelMock = $ this ->createMock (FixtureModel::class);
46
50
$ this ->collectionFactoryMock = $ this ->createPartialMock (CollectionFactory::class, ['create ' ]);
@@ -146,6 +150,10 @@ public function testExecute()
146
150
$ categoryMock ->expects ($ this ->once ())
147
151
->method ('setIsActive ' )
148
152
->willReturnSelf ();
153
+ $ categoryMock ->expects ($ this ->exactly (2 ))
154
+ ->method ('setStoreId ' )
155
+ ->with (Store::DEFAULT_STORE_ID )
156
+ ->willReturnSelf ();
149
157
150
158
$ this ->categoryFactoryMock ->expects ($ this ->once ())->method ('create ' )->willReturn ($ categoryMock );
151
159
You can’t perform that action at this time.
0 commit comments