Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Tests/Twig/Extension/FilelibExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ class FilelibExtensionTest extends PHPUnit_Framework_TestCase

protected function setUp()
{
$this->fileOperator = $this->getMock('Xi\Filelib\File\FileOperator');
$this->fileOperator = $this->getMockBuilder('Xi\Filelib\File\DefaultFileOperator')
->disableOriginalConstructor()
->setMethods(array('find'))->getMock();

$filelib = $this->getMock('Xi\Filelib\FileLibrary');
$filelib = $this->getMockBuilder('Xi\Filelib\FileLibrary')
->disableOriginalConstructor()
->setMethods(array('find', 'findById', 'getFileOperator'))->getMock();
$filelib->expects($this->any())
->method('getFileOperator')
->will($this->returnValue($this->fileOperator));
Expand Down Expand Up @@ -76,7 +80,7 @@ public function isFileCompletedGetsFileWhenGivenAFileId()
$this->file->expects($this->once())
->method('getStatus')
->will($this->returnValue(File::STATUS_COMPLETED));

$this->fileOperator->expects($this->once())
->method('find')
->with(123)
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
],
"minimum-stability": "dev",
"require": {
"php": ">=5.3.3",
"xi/filelib": ">=0.7.0"
"php": ">=5.3.3"
},

"require-dev": {
"symfony/http-kernel": ">=2.1.0",
"symfony/dependency-injection": ">=2.1.0",
"symfony/config": ">=2.1.0",
"symfony/yaml": ">=2.1.0",
"xi/filelib": "dev-master",
"symfony/http-kernel": ">=2.1.0,<2.4-dev",
"symfony/dependency-injection": ">=2.1.0,<2.4-dev",
"symfony/config": ">=2.1.0,<2.4-dev",
"symfony/yaml": ">=2.1.0,<2.4-dev",
"twig/twig": ">=1.9.1"
},

Expand Down