mirror of
https://github.com/hauke68/Magallanes.git
synced 2025-09-16 13:50:17 +02:00
Add more restrictly tests for constructor
This commit is contained in:
parent
e7c0b87ccd
commit
3f02ebcfe4
@ -46,10 +46,13 @@ class CompileCommandTest extends BaseTest
|
|||||||
*/
|
*/
|
||||||
public function testConstruct()
|
public function testConstruct()
|
||||||
{
|
{
|
||||||
$compileCommand = $this->getRawCompileCommand();
|
$compilerMock = $this->getMock('Mage\Compiler');
|
||||||
|
$compileCommand = new CompileCommand($compilerMock);
|
||||||
|
|
||||||
$compilerProperty = $this->getPropertyValue($compileCommand, 'compiler');
|
$compilerProperty = $this->getPropertyValue($compileCommand, 'compiler');
|
||||||
|
|
||||||
$this->assertInstanceOf('Mage\Compiler', $compilerProperty);
|
$this->assertInstanceOf('Mage\Compiler', $compilerProperty);
|
||||||
|
$this->assertSame($compilerMock, $compilerProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -96,15 +99,10 @@ class CompileCommandTest extends BaseTest
|
|||||||
$this->expectOutputString($expectedOutput);
|
$this->expectOutputString($expectedOutput);
|
||||||
$this->iniGetValue->setValue(true);
|
$this->iniGetValue->setValue(true);
|
||||||
|
|
||||||
$compileCommand = $this->getRawCompileCommand();
|
$compilerMock = $this->getMock('Mage\Compiler');
|
||||||
|
$compileCommand = new CompileCommand($compilerMock);
|
||||||
$actualExitCode = $compileCommand->run();
|
$actualExitCode = $compileCommand->run();
|
||||||
|
|
||||||
$this->assertEquals($expectedExitCode, $actualExitCode);
|
$this->assertEquals($expectedExitCode, $actualExitCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getRawCompileCommand()
|
|
||||||
{
|
|
||||||
$compilerMock = $this->getMock('Mage\Compiler');
|
|
||||||
return new CompileCommand($compilerMock);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user