Skip to content

Commit

Permalink
magento#10045 coding standars again
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrkwiecinski committed Jul 24, 2017
1 parent b6ddaa7 commit 9c65d50
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ public function productProvider()
]
),
new DataObject(
['url' => $storeBaseMediaUrl . 'i/m/image_no_caption.png', 'caption' => null]
[
'url' => $storeBaseMediaUrl . 'i/m/image_no_caption.png',
'caption' => null
]
),
],
'thumbnail' => $storeBaseMediaUrl . 't/h/thumbnail.jpg',
Expand Down
31 changes: 16 additions & 15 deletions app/code/Magento/Sitemap/Test/Unit/Model/SitemapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,18 @@ protected function setUp()
->disableOriginalConstructor()
->getMock();

$resourceMethods = [
'_construct',
'beginTransaction',
'rollBack',
'save',
'addCommitCallback',
'commit',
'__wakeup',
];

$this->resourceMock = $this->getMockBuilder(SitemapResource::class)
->setMethods(
[
'_construct',
'beginTransaction',
'rollBack',
'save',
'addCommitCallback',
'commit',
'__wakeup',
])
->setMethods($resourceMethods)
->disableOriginalConstructor()
->getMock();

Expand Down Expand Up @@ -145,7 +146,6 @@ protected function setUp()
->willReturn($this->directoryMock);

$this->configReaderMock = $this->getMockForAbstractClass(SitemapConfigReaderInterface::class);

$this->itemResolverMock = $this->getMockForAbstractClass(ItemResolverInterface::class);
}

Expand Down Expand Up @@ -416,13 +416,14 @@ protected function prepareSitemapModelMock(
->method('write')
->willReturnCallback($streamWriteCallback);

$checkFileCallback = function ($file) use (&$currentFile) {
$currentFile = $file;
};

// Check that all expected file descriptors were created
$this->directoryMock->expects($this->exactly(count($expectedFile)))
->method('openFile')
->willReturnCallback(function ($file) use (&$currentFile) {
$currentFile = $file;
}
);
->willReturnCallback($checkFileCallback);

// Check that all file descriptors were closed
$this->fileMock->expects($this->exactly(count($expectedFile)))
Expand Down

0 comments on commit 9c65d50

Please sign in to comment.