Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions tests/Unit/Model/TemplateEngine/Decorator/InspectorHintsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,10 @@ public function testRenderExtractsModuleNameFromRealBlockClassName(): void

public function testRenderDetectsParentBlockAndAlias(): void
{
$parentBlock = $this->getStubBuilder(AbstractBlock::class)
->disableOriginalConstructor()
->onlyMethods(['getNameInLayout'])
->getStub();
$parentBlock = $this->createStub(AbstractBlock::class);
$parentBlock->method('getNameInLayout')->willReturn('parent.block');

$block = $this->getStubBuilder(AbstractBlock::class)
->disableOriginalConstructor()
->onlyMethods(['getParentBlock', 'getNameInLayout'])
->getStub();
$block = $this->createStub(AbstractBlock::class);
$block->method('getParentBlock')->willReturn($parentBlock);
$block->method('getNameInLayout')->willReturn('child.block');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ protected function setUp(): void
*/
private function createBlock(): AbstractBlock&Stub
{
return $this->getStubBuilder(AbstractBlock::class)
return $this->getMockBuilder(AbstractBlock::class)
->disableOriginalConstructor()
->onlyMethods(['isScopePrivate', 'getCacheKey'])
->getStub();
->getMock();
}

public function testGetCacheInfoReturnsNotCacheableWhenLifetimeIsFalse(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ public function testFindDirectoryFilesUsesDirectoryRootWithoutSubPathAndSkipsMis
->method('isFile')
->willReturnCallback(static fn(string $path): bool => str_ends_with($path, '.phtml'));

$files = $this->createResolver(fileDriver: $fileDriver)->findDirectoryFiles(['/missing', '/module/templates'], '');
$files = $this->createResolver(fileDriver: $fileDriver)
->findDirectoryFiles(['/missing', '/module/templates'], '');

$this->assertSame(
['b.phtml' => '/module/templates/b.phtml', 'z.phtml' => '/module/templates/z.phtml'],
Expand Down
Loading