fix test expectations to be exact in phpunit
This commit is contained in:
parent
a2c25d2d8f
commit
080784adc5
|
@ -134,19 +134,18 @@ class PHPUnitTest extends \PHPUnit_Framework_TestCase
|
||||||
* @covers PHPUnit::execute
|
* @covers PHPUnit::execute
|
||||||
* @covers PHPUnit::runDir
|
* @covers PHPUnit::runDir
|
||||||
*/
|
*/
|
||||||
public function testExecute_CallsExecuteCommandManyTimesWhenGivenArrayDirectory(
|
public function testExecute_CallsExecuteCommandManyTimesWhenGivenArrayDirectory()
|
||||||
)
|
|
||||||
{
|
{
|
||||||
chdir('/');
|
chdir('/');
|
||||||
|
|
||||||
$this->loadPhpUnitWithOptions(
|
$this->loadPhpUnitWithOptions(
|
||||||
array(
|
array(
|
||||||
'directory' => array(0, 1)
|
'directory' => array("dir1", "dir2")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->mockCiBuilder->expects($this->at(0))->method("executeCommand");
|
$this->expectFindBinaryToBeCalled($this->exactly(2));
|
||||||
$this->mockCiBuilder->expects($this->at(1))->method("executeCommand");
|
$this->expectExectuteCommandToBeCalled($this->exactly(2));
|
||||||
|
|
||||||
$returnValue = $this->testedPhpUnit->execute();
|
$returnValue = $this->testedPhpUnit->execute();
|
||||||
}
|
}
|
||||||
|
@ -161,12 +160,12 @@ class PHPUnitTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
$this->loadPhpUnitWithOptions(
|
$this->loadPhpUnitWithOptions(
|
||||||
array(
|
array(
|
||||||
'config' => array(0, 1)
|
'config' => array("configfile1.xml", "configfile2.xml")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->mockCiBuilder->expects($this->at(0))->method("executeCommand");
|
$this->expectFindBinaryToBeCalled($this->exactly(2));
|
||||||
$this->mockCiBuilder->expects($this->at(1))->method("executeCommand");
|
$this->expectExectuteCommandToBeCalled($this->exactly(2));
|
||||||
|
|
||||||
$returnValue = $this->testedPhpUnit->execute();
|
$returnValue = $this->testedPhpUnit->execute();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue