/** * Run test for process method (content not empty) */ public function testProcessContentNotEmpty() { $chainMock = $this->getChainMock(); $assetMock = $this->getAssetMock(); $chainMock->expects(self::once())->method('getContent')->willReturn('test-content'); $chainMock->expects(self::never())->method('getAsset')->willReturn($assetMock); $this->lockerProcessMock->expects(self::never())->method('lockProcess'); $this->lockerProcessMock->expects(self::never())->method('unlockProcess'); $frontendCompilation = new FrontendCompilation($this->assetSourceMock, $this->assetBuilderMock, $this->alternativeSourceMock, $this->lockerProcessMock, 'lock'); $frontendCompilation->process($chainMock); }
/** * Run test for process method (content not empty) */ public function testProcessContentNotEmpty() { $chainMock = $this->getChainMock(); $assetMock = $this->getAssetMock(); $chainMock->expects(self::once())->method('getContent')->willReturn('test-content'); $chainMock->expects(self::once())->method('getAsset')->willReturn($assetMock); $this->lockerProcessMock->expects(self::never())->method('lockProcess'); $this->lockerProcessMock->expects(self::never())->method('unlockProcess'); $alternativeSource = new AlternativeSource($this->objectManagerMock, $this->lockerProcessMock, $this->sorterMock, $this->assetBuilderMock, 'lock', []); $alternativeSource->process($chainMock); }