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/old/vendor/magento/module-adobe-ims/Test/Integration/Model/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/corals/old/vendor/magento/module-adobe-ims/Test/Integration/Model/ConfigTest.php
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

declare(strict_types=1);

namespace Magento\AdobeIms\Test\Integration\Model;

use Magento\TestFramework\Helper\Bootstrap;
use Magento\AdobeIms\Model\Config;
use PHPUnit\Framework\TestCase;

/**
 * Test for \Magento\AdobeIms\Model\Config.
 */
class ConfigTest extends TestCase
{
    private const SCOPES = ['openid', 'creative_sdk', 'email', 'profile'];
    private const LOCALE = 'en_US';
    private const REDIRECT_URL_PATTERN = '/redirect_uri=[a-zA-Z0-9\/:._]*\/adobe_ims\/oauth\/callback/';

    /**
     * @var Config
     */
    private $model;

    /**
     * @inheritdoc
     */
    protected function setUp(): void
    {
        $this->model = Bootstrap::getObjectManager()->get(Config::class);
    }

    /**
     * Test for getAuthUrl().
     */
    public function testGetAuthUrl(): void
    {
        $result = $this->model->getAuthUrl();

        $this->assertStringContainsString('scope=' . implode(',', self::SCOPES), $result);
        $this->assertStringContainsString('locale=' . self::LOCALE, $result);
        $this->assertMatchesRegularExpression(self::REDIRECT_URL_PATTERN, $result);
    }
}

Spamworldpro Mini