HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/demo.sports-crowd.com/vendor/dnetix/redirection/tests/BaseTestCase.php
<?php

namespace Tests;

use Dnetix\Redirection\Helpers\Settings;
use Dnetix\Redirection\PlacetoPay;
use PHPUnit\Framework\TestCase;
use Tests\Mocks\RestCarrierMock;

class BaseTestCase extends TestCase
{
    public function getDefaultSettings(array $overrides = []): array
    {
        return array_replace([
            'client' => RestCarrierMock::client(),
            'login' => 'not_the_real_login_obviously',
            'tranKey' => 'kXf6FDYdQTH4dhwWs3Ue',
            'baseUrl' => 'https://checkout-test.placetopay.com',
        ], $overrides);
    }

    public function getSettings(array $overrides = []): Settings
    {
        return new Settings($this->getDefaultSettings($overrides));
    }

    public function getService(array $overrides = []): PlacetoPay
    {
        return new PlacetoPay($this->getDefaultSettings($overrides));
    }

    public function baseRequest(array $overrides = []): array
    {
        return array_replace_recursive([
            'payment' => [
                'reference' => 'TEST_20210913_120000',
                'amount' => [
                    'total' => 12844,
                    'currency' => 'COP',
                ],
            ],
            'returnUrl' => 'https://dnetix.co/ping/example',
            'ipAddress' => '127.0.0.1',
            'userAgent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9',
        ], $overrides);
    }
}