Ejemplo n.º 1
0
 function let(Listener $listener)
 {
     MFS::mkdir(MFS::$tmpDir);
     $listener->getPaths()->willReturn(array(MFS::$tmpDir));
     $listener->getIgnores()->willReturn(array());
     $listener->getPatterns()->willReturn(array());
 }
Ejemplo n.º 2
0
 function let(Listener $listener)
 {
     MFS::mkdir(MFS::$tmpDir);
     $listener->hasPath(Argument::any())->willReturn(true);
     $listener->getPatterns()->willReturn(array());
     $listener->getIgnores()->willReturn(array());
 }
Ejemplo n.º 3
0
 function let(AdapterInterface $adapter, Listener $listener, TrackedObject $tracked, ResourceInterface $resource)
 {
     MFS::mkdir(MFS::$tmpDir);
     touch($this->testFile = MFS::$tmpDir . '/test.txt');
     $listener->getPaths()->willReturn(array(MFS::$tmpDir));
     $listener->getIgnores()->willReturn(array());
     $listener->getPatterns()->willReturn(array());
     $listener->hasPath(Argument::any())->willReturn(true);
     $tracked->getID()->willReturn(PathUtil::createPathID($this->testFile));
     $tracked->getResource()->willReturn($resource);
     $tracked->getResource()->willReturn($resource);
     $resource->getResource()->willReturn(PathUtil::createSplFileInfo(MFS::$tmpDir, $this->testFile));
     $resource->__toString()->willReturn($this->testFile);
     $this->beConstructedWith($adapter);
     $this->fileOnly(false);
     $this->add($tracked);
     $this->initialize($listener);
 }