Fixed bugs in the tests

This commit is contained in:
Romain Biard 2016-11-16 14:46:11 -03:00
commit 5ef964f2b5
3 changed files with 9 additions and 2 deletions

View file

@ -31,7 +31,7 @@ class WaveformFilters
*/ */
public function setDownmix() public function setDownmix()
{ {
$this->waveform->addFilter(new DownmixFilter()); $this->waveform->addFilter(new WaveformDownmixFilter());
return $this; return $this;
} }

View file

@ -9,7 +9,7 @@ class WaveformFiltersTest extends TestCase
{ {
public function testResize() public function testResize()
{ {
$Waveform = $this->createMock(Waveform::class); $Waveform = $this->getWaveformMock();
$filters = new WaveformFilters($Waveform); $filters = new WaveformFilters($Waveform);
$Waveform->expects($this->once()) $Waveform->expects($this->once())

View file

@ -47,6 +47,13 @@ class TestCase extends \PHPUnit_Framework_TestCase
->getMock(); ->getMock();
} }
public function getWaveformMock()
{
return $this->getMockBuilder('FFMpeg\Media\Waveform')
->disableOriginalConstructor()
->getMock();
}
public function getFFMpegDriverMock() public function getFFMpegDriverMock()
{ {
return $this->getMockBuilder('FFMpeg\Driver\FFMpegDriver') return $this->getMockBuilder('FFMpeg\Driver\FFMpegDriver')