!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/wataxi.picotech.app/public_html/vendor/akaunting/money/tests/   drwxr-xr-x
Free 23.49 GB of 117.98 GB (19.91%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     CurrencyTest.php (2.83 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

use Akaunting\Money\Currency;
use 
PHPUnit\Framework\TestCase;

class 
CurrencyTest extends TestCase
{
    public function 
testFactoryMethods()
    {
        
$this->assertEquals(Currency::USD(), new Currency('USD'));
        
$this->assertEquals(Currency::TRY(), new Currency('TRY'));
    }

    public function 
testCantInstantiateUnknownCurrency()
    {
        
$this->expectException(OutOfBoundsException::class);

        new 
Currency('unknown');
    }

    public function 
testComparison()
    {
        
$c1 = new Currency('USD');
        
$c2 = new Currency('TRY');

        
$this->assertTrue($c1->equals(new Currency('USD')));
        
$this->assertTrue($c2->equals(new Currency('TRY')));
        
$this->assertFalse($c1->equals($c2));
        
$this->assertFalse($c2->equals($c1));
    }

    public function 
testGetters()
    {
        
$c1 = new Currency('USD');

        
$this->assertEquals('USD'$c1->getCurrency());
        
$this->assertEquals('US Dollar'$c1->getName());
        
$this->assertEquals(840$c1->getCode());
        
$this->assertEquals(2$c1->getPrecision());
        
$this->assertEquals(100$c1->getSubunit());
        
$this->assertEquals('$'$c1->getSymbol());
        
$this->assertEquals(true$c1->isSymbolFirst());
        
$this->assertEquals('.'$c1->getDecimalMark());
        
$this->assertEquals(','$c1->getThousandsSeparator());
        
$this->assertEquals('$'$c1->getPrefix());
        
$this->assertEquals(''$c1->getSuffix());
        
$this->assertNotEmpty($c1->toArray()['USD']);
        
$this->assertJson($c1->toJson());
        
$this->assertNotEmpty($c1->jsonSerialize()['USD']);

        
$c2 = new Currency('CDF');
        
$this->assertEquals('CDF'$c2->getCurrency());
        
$this->assertEquals('Congolese Franc'$c2->getName());
        
$this->assertEquals(976$c2->getCode());
        
$this->assertEquals(2$c2->getPrecision());
        
$this->assertEquals(100$c2->getSubunit());
        
$this->assertEquals('Fr'$c2->getSymbol());
        
$this->assertEquals(false$c2->isSymbolFirst());
        
$this->assertEquals('.'$c2->getDecimalMark());
        
$this->assertEquals(','$c2->getThousandsSeparator());
        
$this->assertEquals(''$c2->getPrefix());
        
$this->assertEquals(' Fr'$c2->getSuffix());
        
$this->assertNotEmpty($c2->toArray()['CDF']);
        
$this->assertJson($c2->toJson());
        
$this->assertNotEmpty($c2->jsonSerialize()['CDF']);
    }

    public function 
testToString()
    {
        
$this->assertEquals('USD (US Dollar)', (string) new Currency('USD'));
        
$this->assertEquals('TRY (Turkish Lira)', (string) new Currency('TRY'));
    }

    public function 
testResetCurrencies()
    {
        
$currencies Currency::getCurrencies();
        
Currency::setCurrencies([]);
        
$this->assertEmpty(Currency::getCurrencies());
        
Currency::setCurrencies($currencies);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0058 ]--