!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/mockery/mockery/tests/Mockery/   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:     SpyTest.php (2.1 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace test\Mockery;

use 
Mockery as m;
use 
Mockery\Spy;

class 
SpyTest extends \PHPUnit_Framework_TestCase
{
    public function 
setup()
    {
        
$this->container = new \Mockery\Container;
    }

    public function 
teardown()
    {
        
$this->container->mockery_close();
    }

    
/** @test */
    
public function itVerifiesAMethodWasCalled()
    {
        
$spy m::spy();
        
$spy->myMethod();
        
$spy->shouldHaveReceived("myMethod");

        
$this->setExpectedException("Mockery\Exception\InvalidCountException");
        
$spy->shouldHaveReceived("someMethodThatWasNotCalled");
    }

    
/** @test */
    
public function itVerifiesAMethodWasNotCalled()
    {
        
$spy m::spy();
        
$spy->shouldNotHaveReceived("myMethod");

        
$this->setExpectedException("Mockery\Exception\InvalidCountException");
        
$spy->myMethod();
        
$spy->shouldNotHaveReceived("myMethod");
    }

    
/** @test */
    
public function itVerifiesAMethodWasNotCalledWithParticularArguments()
    {
        
$spy m::spy();
        
$spy->myMethod(123456);

        
$spy->shouldNotHaveReceived("myMethod", array(78910));

        
$this->setExpectedException("Mockery\Exception\InvalidCountException");
        
$spy->shouldNotHaveReceived("myMethod", array(123456));
    }

    
/** @test */
    
public function itVerifiesAMethodWasCalledASpecificNumberOfTimes()
    {
        
$spy m::spy();
        
$spy->myMethod();
        
$spy->myMethod();
        
$spy->shouldHaveReceived("myMethod")->twice();

        
$this->setExpectedException("Mockery\Exception\InvalidCountException");
        
$spy->myMethod();
        
$spy->shouldHaveReceived("myMethod")->twice();
    }

    
/** @test */
    
public function itVerifiesAMethodWasCalledWithSpecificArguments()
    {
        
$spy m::spy();
        
$spy->myMethod(123"a string");
        
$spy->shouldHaveReceived("myMethod")->with(123"a string");
        
$spy->shouldHaveReceived("myMethod", array(123"a string"));

        
$this->setExpectedException("Mockery\Exception\InvalidCountException");
        
$spy->shouldHaveReceived("myMethod")->with(123);
    }
}

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