!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_led/php/vendor/mjohnson/decoda/tests/Decoda/Hook/   drwxrwxr-x
Free 15.6 GB of 61.93 GB (25.2%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     EmoticonHookTest.php (5.86 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * @copyright   2006-2014, Miles Johnson - http://milesj.me
 * @license     https://github.com/milesj/decoda/blob/master/license.md
 * @link        http://milesj.me/code/php/decoda
 */

namespace Decoda\Hook;

use 
Decoda\Decoda;
use 
Decoda\Filter\DefaultFilter;
use 
Decoda\Hook\EmoticonHook;
use 
Decoda\Test\TestCase;
use 
Decoda\Loader\DataLoader;

class 
EmoticonHookTest extends TestCase {

    
/**
     * Set up Decoda.
     */
    
protected function setUp() {
        
parent::setUp();

        
$this->object->setBrackets('['']');
        
$this->object->setLineBreaks(true);
        
$this->object->setXhtml(false);

        
$this->object->addFilter(new DefaultFilter());

        
$hook = new EmoticonHook();
        
$hook->addLoader(new DataLoader(array(
            
'test/tag/within' => array('[o]_[o]'),
            
'test/tag/open'   => array('['),
            
'test/tag/close'  => array(']'),
            
'test/unicode'    => array("\342\230\272"),
        )));

        
$this->object->addHook($hook);
    }

    
/**
     * Test smiley detection according to the positioning.
     *
     * @dataProvider getSmileyDetectionData
     */
    
public function testSmileyDetection($value$expected) {
        
$this->assertEquals($expected$this->object->reset($value)->parse());
    }

    
/**
     * Provide all smiley patterns.
     *
     * @return array
     */
    
public function getSmileyDetectionData() {
        return array(
            array(
':/ at the beginning''<img class="decoda-emoticon" src="/images/hm.png" alt=""> at the beginning'),
            array(
'Smiley at the end :O''Smiley at the end <img class="decoda-emoticon" src="/images/gah.png" alt="">'),
            array(
'Smiley in the middle :P of a string''Smiley in the middle <img class="decoda-emoticon" src="/images/tongue.png" alt=""> of a string'),
            array(
':):):)''<img class="decoda-emoticon" src="/images/happy.png" alt=""><img class="decoda-emoticon" src="/images/happy.png" alt=""><img class="decoda-emoticon" src="/images/happy.png" alt="">'),
            array(
'At the :)start of the word''At the <img class="decoda-emoticon" src="/images/happy.png" alt="">start of the word'),
            array(
'At the mid:)dle of the word''At the mid:)dle of the word'),
            array(
'At the end:) of the word''At the end<img class="decoda-emoticon" src="/images/happy.png" alt=""> of the word'),
            array(
'At the miD:dle and end of the word D: ''At the miD:dle and end of the word <img class="decoda-emoticon" src="/images/gah.png" alt="">'),
            array(
'http://''http://'),
            array(
"With a :/\n linefeed"'With a <img class="decoda-emoticon" src="/images/hm.png" alt=""><br> linefeed'),
            array(
"With a :/\r carriage return"'With a <img class="decoda-emoticon" src="/images/hm.png" alt=""><br> carriage return'),
            array(
"With a :/\t tab"'With a <img class="decoda-emoticon" src="/images/hm.png" alt="">' "\t" ' tab'),
            array(
':/ :/''<img class="decoda-emoticon" src="/images/hm.png" alt=""> <img class="decoda-emoticon" src="/images/hm.png" alt="">'),
            array(
':/ :/''<img class="decoda-emoticon" src="/images/hm.png" alt=""> <img class="decoda-emoticon" src="/images/hm.png" alt="">'),
            array(
':/ :/ :/''<img class="decoda-emoticon" src="/images/hm.png" alt=""> <img class="decoda-emoticon" src="/images/hm.png" alt=""> <img class="decoda-emoticon" src="/images/hm.png" alt="">'),
            array(
'Testing custom emoticon [''Testing custom emoticon <img class="decoda-emoticon" src="/images/test/tag/open.png" alt="">'),
            array(
'Testing custom emoticon ]''Testing custom emoticon <img class="decoda-emoticon" src="/images/test/tag/close.png" alt="">'),
            array(
'Testing custom emoticon [o]_[o]''Testing custom emoticon <img class="decoda-emoticon" src="/images/test/tag/within.png" alt="">'),
            array(
'[ b ] :/[ / b ]''<b> <img class="decoda-emoticon" src="/images/hm.png" alt=""></b>'),
            array(
'[ b ]:/ [ / b ]''<b><img class="decoda-emoticon" src="/images/hm.png" alt=""> </b>'),
            array(
'[ b ]:/[ / b ]''<b><img class="decoda-emoticon" src="/images/hm.png" alt=""></b>'),
            array(
'[ b ][[ / b ]''<b><img class="decoda-emoticon" src="/images/test/tag/open.png" alt=""></b>'),
            array(
'[ b ]][ / b ]''<b><img class="decoda-emoticon" src="/images/test/tag/close.png" alt=""></b>'),
            array(
'[ b ][o]_[o][ / b ]''<b><img class="decoda-emoticon" src="/images/test/tag/within.png" alt=""></b>'),
            array(
':/[ b ]:/[ / b ]:/''<img class="decoda-emoticon" src="/images/hm.png" alt=""><b><img class="decoda-emoticon" src="/images/hm.png" alt=""></b><img class="decoda-emoticon" src="/images/hm.png" alt="">'),
            array(
'[ b ]:/[ b ]:/[ / b ]:/[ / b ]''<b><img class="decoda-emoticon" src="/images/hm.png" alt=""><b><img class="decoda-emoticon" src="/images/hm.png" alt=""></b><img class="decoda-emoticon" src="/images/hm.png" alt=""></b>'),
            array(
'Testing custom emoticon ☺ (unicode)''Testing custom emoticon <img class="decoda-emoticon" src="/images/test/unicode.png" alt=""> (unicode)'),
        );
    }

    
/**
     * Test that smiley faces are converted to emoticon images.
     *
     * @dataProvider getSmileyConversionData
     */
    
public function testSmileyConversion($value$expected) {
        
$this->assertEquals($expected$this->object->reset($value)->parse());
    }

    
/**
     * Provide a mapping of smiley and rendered form.
     *
     * @return array
     */
    
public function getSmileyConversionData() {
        
$this->setUp();
        
$hook $this->object->getHook('Emoticon');
        
$hook->startup();

        
$data = array();

        foreach (
$hook->getSmilies() as $smile) {
            
$data[] = array($smile$hook->render($smile$this->object->getConfig('xhtmlOutput')));
        }

        return 
$data;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.5084 ]--