function it_should_listen_to_filesystem_update_event(Listener $listener) { $newFile = MFS::$tmpDir . '/update.txt'; MFS::cleanDir(MFS::$tmpDir); MFS::mkdir(MFS::$tmpDir); touch($newFile); $listener->getPaths()->shouldBeCalled()->willReturn(array(MFS::$tmpDir)); $listener->hasPath(Argument::any())->shouldBeCalled()->willReturn(true); $this->beConstructedWith(null); $this->initialize($listener); file_put_contents($newFile, 'Hello WOrld', LOCK_EX); $this->evaluate(); $this->getChangeSet()->shouldHaveCount(1); }
function letgo() { MFS::cleanDir(MFS::$tmpDir); }
function letgo() { mfs::cleanDir(mfs::$tmpDir); }