root = vfsStream::setup(); } /** * @covers Alchemy\Phrasea\Border\Manager::bookLazaretPathfile */ public function testBookFile() { $mockedPathResolver = function ($path) { return $path; }; $sut = new LazaretPathBooker(new Filesystem(), $this->root->url(), $mockedPathResolver); $file1 = $sut->bookFile('babebibobu.txt'); $file2 = $sut->bookFile('babebibobu.txt'); $this->assertNotEquals($file2, $file1); $this->assertCount(2, $this->root->getChildren()); $this->assertTrue($this->root->hasChild(vfsStream::path($file1))); $this->assertTrue($this->root->hasChild(vfsStream::path($file2))); } }