CommerceGuys\Addressing\Tests\Repository\ZoneRepositoryTest::testConstructor PHP Метод

testConstructor() публичный Метод

public testConstructor ( )
    public function testConstructor()
    {
        // Mock the existence of JSON definitions on the filesystem.
        $root = vfsStream::setup('resources');
        $directory = vfsStream::newDirectory('zone')->at($root);
        foreach ($this->zones as $id => $definition) {
            $filename = $id . '.json';
            vfsStream::newFile($filename)->at($directory)->setContent(json_encode($definition));
        }
        // Instantiate the zone repository and confirm that the
        // definition path was properly set.
        $zoneRepository = new ZoneRepository('vfs://resources/zone/');
        $definitionPath = $this->getObjectAttribute($zoneRepository, 'definitionPath');
        $this->assertEquals('vfs://resources/zone/', $definitionPath);
        return $zoneRepository;
    }