Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions | Protected Attributes
RequireUpdateDryRunCommandTest Class Reference
Inheritance diagram for RequireUpdateDryRunCommandTest:

Public Member Functions

 testRun ()
 
 testRunException ()
 

Protected Member Functions

 setUp ()
 

Protected Attributes

 $application
 
 $infoCommand
 
 $requireUpdateDryRunCommand
 

Detailed Description

Definition at line 11 of file RequireUpdateDryRunCommandTest.php.

Member Function Documentation

◆ setUp()

setUp ( )
protected

Definition at line 65 of file RequireUpdateDryRunCommandTest.php.

66  {
67  $this->application = $this->createMock(\Magento\Composer\MagentoComposerApplication::class);
68  $this->infoCommand = $this->createMock(\Magento\Composer\InfoCommand::class);
69 
70  $this->requireUpdateDryRunCommand = new RequireUpdateDryRunCommand(
71  $this->application,
72  $this->infoCommand
73  );
74  }

◆ testRun()

testRun ( )

Definition at line 76 of file RequireUpdateDryRunCommandTest.php.

77  {
78  $this->application->expects($this->exactly(2))->method('runComposerCommand');
79  $this->requireUpdateDryRunCommand->run([], '');
80  }

◆ testRunException()

testRunException ( )

@expectedException \RuntimeException @expectedExceptionMessage

Definition at line 86 of file RequireUpdateDryRunCommandTest.php.

87  {
88  $this->application->expects($this->at(1))
89  ->method('runComposerCommand')
90  ->willThrowException(new \RuntimeException($this->errorMessage));
91  $this->infoCommand->expects($this->once())->method('run')->willReturn($this->packageInfo);
92  $this->requireUpdateDryRunCommand->run(['3rdp/e 1.2.0'], '');
93  }

Field Documentation

◆ $application

$application
protected

Definition at line 16 of file RequireUpdateDryRunCommandTest.php.

◆ $infoCommand

$infoCommand
protected

Definition at line 21 of file RequireUpdateDryRunCommandTest.php.

◆ $requireUpdateDryRunCommand

$requireUpdateDryRunCommand
protected

Definition at line 26 of file RequireUpdateDryRunCommandTest.php.


The documentation for this class was generated from the following file: