PhpBench\Tests\Unit\Storage\Driver\Xml\XmlDriverTest::testStoreMkdir PHP Method

testStoreMkdir() public method

It should create a non existing directory when storing the collection.
public testStoreMkdir ( )
    public function testStoreMkdir()
    {
        $this->collection->getSuites()->willReturn([$this->suite->reveal()]);
        $this->suite->getUuid()->willReturn($uuid = '1339f38b191b77e1185f9729eb25a2aa4e262b01');
        $this->filesystem->exists('/path/to/7e0/3/c')->willReturn(false);
        $this->filesystem->mkdir('/path/to/7e0/3/c')->shouldBeCalled();
        $this->xmlEncoder->encode(Argument::type(SuiteCollection::class))->shouldBeCalled()->willReturn($this->document->reveal());
        $this->document->save('/path/to/7e0/3/c/' . $uuid . '.xml')->shouldBeCalled();
        $this->driver->store($this->collection->reveal());
    }