!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/hamcrest/hamcrest-php/tests/Hamcrest/   drwxr-xr-x
Free 116.59 GB of 200.55 GB (58.14%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     MatcherAssertTest.php (7.17 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace Hamcrest;

class 
MatcherAssertTest extends \PhpUnit_Framework_TestCase
{

    protected function 
setUp()
    {
        \
Hamcrest\MatcherAssert::resetCount();
    }

    public function 
testResetCount()
    {
        \
Hamcrest\MatcherAssert::assertThat(true);
        
self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
        \
Hamcrest\MatcherAssert::resetCount();
        
self::assertEquals(0, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
    }

    public function 
testAssertThatWithTrueArgPasses()
    {
        \
Hamcrest\MatcherAssert::assertThat(true);
        \
Hamcrest\MatcherAssert::assertThat('non-empty');
        \
Hamcrest\MatcherAssert::assertThat(1);
        \
Hamcrest\MatcherAssert::assertThat(3.14159);
        \
Hamcrest\MatcherAssert::assertThat(array(true));
        
self::assertEquals(5, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
    }

    public function 
testAssertThatWithFalseArgFails()
    {
        try {
            \
Hamcrest\MatcherAssert::assertThat(false);
            
self::fail('expected assertion failure');
        } catch (\
Hamcrest\AssertionError $ex) {
            
self::assertEquals(''$ex->getMessage());
        }
        try {
            \
Hamcrest\MatcherAssert::assertThat(null);
            
self::fail('expected assertion failure');
        } catch (\
Hamcrest\AssertionError $ex) {
            
self::assertEquals(''$ex->getMessage());
        }
        try {
            \
Hamcrest\MatcherAssert::assertThat('');
            
self::fail('expected assertion failure');
        } catch (\
Hamcrest\AssertionError $ex) {
            
self::assertEquals(''$ex->getMessage());
        }
        try {
            \
Hamcrest\MatcherAssert::assertThat(0);
            
self::fail('expected assertion failure');
        } catch (\
Hamcrest\AssertionError $ex) {
            
self::assertEquals(''$ex->getMessage());
        }
        try {
            \
Hamcrest\MatcherAssert::assertThat(0.0);
            
self::fail('expected assertion failure');
        } catch (\
Hamcrest\AssertionError $ex) {
            
self::assertEquals(''$ex->getMessage());
        }
        try {
            \
Hamcrest\MatcherAssert::assertThat(array());
            
self::fail('expected assertion failure');
        } catch (\
Hamcrest\AssertionError $ex) {
            
self::assertEquals(''$ex->getMessage());
        }
        
self::assertEquals(6, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
    }

    public function 
testAssertThatWithIdentifierAndTrueArgPasses()
    {
        \
Hamcrest\MatcherAssert::assertThat('identifier'true);
        \
Hamcrest\MatcherAssert::assertThat('identifier''non-empty');
        \
Hamcrest\MatcherAssert::assertThat('identifier'1);
        \
Hamcrest\MatcherAssert::assertThat('identifier'3.14159);
        \
Hamcrest\MatcherAssert::assertThat('identifier', array(true));
        
self::assertEquals(5, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
    }

    public function 
testAssertThatWithIdentifierAndFalseArgFails()
    {
        try {
            \
Hamcrest\MatcherAssert::assertThat('identifier'false);
            
self::fail('expected assertion failure');
        } catch (\
Hamcrest\AssertionError $ex) {
            
self::assertEquals('identifier'$ex->getMessage());
        }
        try {
            \
Hamcrest\MatcherAssert::assertThat('identifier'null);
            
self::fail('expected assertion failure');
        } catch (\
Hamcrest\AssertionError $ex) {
            
self::assertEquals('identifier'$ex->getMessage());
        }
        try {
            \
Hamcrest\MatcherAssert::assertThat('identifier''');
            
self::fail('expected assertion failure');
        } catch (\
Hamcrest\AssertionError $ex) {
            
self::assertEquals('identifier'$ex->getMessage());
        }
        try {
            \
Hamcrest\MatcherAssert::assertThat('identifier'0);
            
self::fail('expected assertion failure');
        } catch (\
Hamcrest\AssertionError $ex) {
            
self::assertEquals('identifier'$ex->getMessage());
        }
        try {
            \
Hamcrest\MatcherAssert::assertThat('identifier'0.0);
            
self::fail('expected assertion failure');
        } catch (\
Hamcrest\AssertionError $ex) {
            
self::assertEquals('identifier'$ex->getMessage());
        }
        try {
            \
Hamcrest\MatcherAssert::assertThat('identifier', array());
            
self::fail('expected assertion failure');
        } catch (\
Hamcrest\AssertionError $ex) {
            
self::assertEquals('identifier'$ex->getMessage());
        }
        
self::assertEquals(6, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
    }

    public function 
testAssertThatWithActualValueAndMatcherArgsThatMatchPasses()
    {
        \
Hamcrest\MatcherAssert::assertThat(trueis(true));
        
self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
    }

    public function 
testAssertThatWithActualValueAndMatcherArgsThatDontMatchFails()
    {
        
$expected 'expected';
        
$actual 'actual';

        
$expectedMessage =
            
'Expected: "expected"' PHP_EOL .
            
'     but: was "actual"';

        try {
            \
Hamcrest\MatcherAssert::assertThat($actualequalTo($expected));
            
self::fail('expected assertion failure');
        } catch (\
Hamcrest\AssertionError $ex) {
            
self::assertEquals($expectedMessage$ex->getMessage());
            
self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
        }
    }

    public function 
testAssertThatWithIdentifierAndActualValueAndMatcherArgsThatMatchPasses()
    {
        \
Hamcrest\MatcherAssert::assertThat('identifier'trueis(true));
        
self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
    }

    public function 
testAssertThatWithIdentifierAndActualValueAndMatcherArgsThatDontMatchFails()
    {
        
$expected 'expected';
        
$actual 'actual';

        
$expectedMessage =
            
'identifier' PHP_EOL .
            
'Expected: "expected"' PHP_EOL .
            
'     but: was "actual"';

        try {
            \
Hamcrest\MatcherAssert::assertThat('identifier'$actualequalTo($expected));
            
self::fail('expected assertion failure');
        } catch (\
Hamcrest\AssertionError $ex) {
            
self::assertEquals($expectedMessage$ex->getMessage());
            
self::assertEquals(1, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
        }
    }

    public function 
testAssertThatWithNoArgsThrowsErrorAndDoesntIncrementCount()
    {
        try {
            \
Hamcrest\MatcherAssert::assertThat();
            
self::fail('expected invalid argument exception');
        } catch (\
InvalidArgumentException $ex) {
            
self::assertEquals(0, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
        }
    }

    public function 
testAssertThatWithFourArgsThrowsErrorAndDoesntIncrementCount()
    {
        try {
            \
Hamcrest\MatcherAssert::assertThat(1234);
            
self::fail('expected invalid argument exception');
        } catch (\
InvalidArgumentException $ex) {
            
self::assertEquals(0, \Hamcrest\MatcherAssert::getCount(), 'assertion count');
        }
    }
}

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