!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/it-man.ztu.edu.ua/src/vendor/swiftmailer/swiftmailer/tests/unit/Swift/Plugins/   drwxr-xr-x
Free 116.5 GB of 200.55 GB (58.09%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

class Swift_Plugins_AntiFloodPluginTest extends \PHPUnit_Framework_TestCase
{
    public function 
testThresholdCanBeSetAndFetched()
    {
        
$plugin = new Swift_Plugins_AntiFloodPlugin(10);
        
$this->assertEquals(10$plugin->getThreshold());
        
$plugin->setThreshold(100);
        
$this->assertEquals(100$plugin->getThreshold());
    }

    public function 
testSleepTimeCanBeSetAndFetched()
    {
        
$plugin = new Swift_Plugins_AntiFloodPlugin(105);
        
$this->assertEquals(5$plugin->getSleepTime());
        
$plugin->setSleepTime(1);
        
$this->assertEquals(1$plugin->getSleepTime());
    }

    public function 
testPluginStopsConnectionAfterThreshold()
    {
        
$transport $this->_createTransport();
        
$transport->expects($this->once())
                  ->
method('start');
        
$transport->expects($this->once())
                  ->
method('stop');

        
$evt $this->_createSendEvent($transport);

        
$plugin = new Swift_Plugins_AntiFloodPlugin(10);
        for (
$i 0$i 12; ++$i) {
            
$plugin->sendPerformed($evt);
        }
    }

    public function 
testPluginCanStopAndStartMultipleTimes()
    {
        
$transport $this->_createTransport();
        
$transport->expects($this->exactly(5))
                  ->
method('start');
        
$transport->expects($this->exactly(5))
                  ->
method('stop');

        
$evt $this->_createSendEvent($transport);

        
$plugin = new Swift_Plugins_AntiFloodPlugin(2);
        for (
$i 0$i 11; ++$i) {
            
$plugin->sendPerformed($evt);
        }
    }

    public function 
testPluginCanSleepDuringRestart()
    {
        
$sleeper $this->getMock('Swift_Plugins_Sleeper');
        
$sleeper->expects($this->once())
                ->
method('sleep')
                ->
with(10);

        
$transport $this->_createTransport();
        
$transport->expects($this->once())
                  ->
method('start');
        
$transport->expects($this->once())
                  ->
method('stop');

        
$evt $this->_createSendEvent($transport);

        
$plugin = new Swift_Plugins_AntiFloodPlugin(9910$sleeper);
        for (
$i 0$i 101; ++$i) {
            
$plugin->sendPerformed($evt);
        }
    }

    
// -- Creation Methods

    
private function _createTransport()
    {
        return 
$this->getMock('Swift_Transport');
    }

    private function 
_createSendEvent($transport)
    {
        
$evt $this->getMockBuilder('Swift_Events_SendEvent')
                    ->
disableOriginalConstructor()
                    ->
getMock();
        
$evt->expects($this->any())
            ->
method('getSource')
            ->
will($this->returnValue($transport));
        
$evt->expects($this->any())
            ->
method('getTransport')
            ->
will($this->returnValue($transport));

        return 
$evt;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0134 ]--