public function testRemoveMembers() { $resource = $this->getResource(self::$zipFile); $mockProcessBuilder = $this->getMock('Symfony\\Component\\Process\\ProcessBuilder'); $mockProcessBuilder->expects($this->at(0))->method('add')->with($this->equalTo('-d'))->will($this->returnSelf()); $mockProcessBuilder->expects($this->at(1))->method('add')->with($this->equalTo($resource->getResource()))->will($this->returnSelf()); $mockProcessBuilder->expects($this->at(2))->method('add')->with($this->equalTo(__DIR__ . '/../TestCase.php'))->will($this->returnSelf()); $mockProcessBuilder->expects($this->at(3))->method('add')->with($this->equalTo('path-to-file'))->will($this->returnSelf()); $mockProcessBuilder->expects($this->once())->method('getProcess')->will($this->returnValue($this->getSuccessFullMockProcess())); $archiveFileMock = $this->getMock('Alchemy\\Zippy\\Archive\\MemberInterface'); $archiveFileMock->expects($this->any())->method('getLocation')->will($this->returnValue('path-to-file')); $this->adapter->setInflator($this->getZippyMockBuilder($mockProcessBuilder)); $this->adapter->remove($resource, array(__DIR__ . '/../TestCase.php', $archiveFileMock)); }