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/job-board.corals.io/vendor/omise/omise-php/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/job-board.corals.io/vendor/omise/omise-php/tests/ForexTest.php
<?php

use PHPUnit\Framework\TestCase;

class ForexTest extends TestCase
{
    /**
     * @test
     * OmiseForex class must be contain methods as below.
     */
    public function existing_methods()
    {
        $this->assertTrue(method_exists('OmiseSchedule', 'retrieve'));
        $this->assertTrue(method_exists('OmiseSchedule', 'reload'));
        $this->assertTrue(method_exists('OmiseSchedule', 'getUrl'));
    }

    /**
     * @test
     * Forex do not work with staging api key
     */
    public function retrieve()
    {
        $forex = OmiseForex::retrieve('usd');
        $this->assertArrayHasKey('object', $forex);
        $this->assertEquals('forex', $forex['object']);
        $this->assertEquals('usd', $forex['from']);
    }

    /**
     * @test
     * Forex do not work with staging api key
     */
    public function reload()
    {
        $forex = OmiseForex::retrieve('usd');
        $forex->reload();

        $this->assertArrayHasKey('object', $forex);
        $this->assertEquals('forex', $forex['object']);
        $this->assertEquals('usd', $forex['from']);
    }
}

Spamworldpro Mini