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

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/opt/alt/php54/usr/share/pear/test/Routing/Symfony/Component/Routing/Tests/Loader/   drwxr-xr-x
Free 292.48 GB of 429.69 GB (68.07%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Routing\Tests\Loader;

use 
Symfony\Component\Routing\Annotation\Route;

class 
AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest
{
    protected 
$loader;

    protected function 
setUp()
    {
        
parent::setUp();

        
$this->reader $this->getReader();
        
$this->loader $this->getClassLoader($this->reader);
    }

    
/**
     * @expectedException \InvalidArgumentException
     */
    
public function testLoadMissingClass()
    {
        
$this->loader->load('MissingClass');
    }

    
/**
     * @expectedException \InvalidArgumentException
     */
    
public function testLoadAbstractClass()
    {
        
$this->loader->load('Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\AbstractClass');
    }

    
/**
     * @dataProvider provideTestSupportsChecksResource
     */
    
public function testSupportsChecksResource($resource$expectedSupports)
    {
        
$this->assertSame($expectedSupports$this->loader->supports($resource), '->supports() returns true if the resource is loadable');
    }

    public function 
provideTestSupportsChecksResource()
    {
        return array(
            array(
'class'true),
            array(
'\fully\qualified\class\name'true),
            array(
'namespaced\class\without\leading\slash'true),
            array(
'ÿClassWithLegalSpecialCharacters'true),
            array(
'5'false),
            array(
'foo.foo'false),
            array(
nullfalse),
        );
    }

    public function 
testSupportsChecksTypeIfSpecified()
    {
        
$this->assertTrue($this->loader->supports('class''annotation'), '->supports() checks the resource type if specified');
        
$this->assertFalse($this->loader->supports('class''foo'), '->supports() checks the resource type if specified');
    }

    public function 
getLoadTests()
    {
        return array(
            array(
                
'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass',
                array(
'name' => 'route1'),
                array(
'arg2' => 'defaultValue2''arg3' => 'defaultValue3')
            ),
            array(
                
'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass',
                array(
'name' => 'route1''defaults' => array('arg2' => 'foo')),
                array(
'arg2' => 'defaultValue2''arg3' => 'defaultValue3')
            ),
            array(
                
'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass',
                array(
'name' => 'route1''defaults' => array('arg2' => 'foobar')),
                array(
'arg2' => 'defaultValue2''arg3' =>'defaultValue3')
            ),
            array(
                
'Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BarClass',
                array(
'name' => 'route1''defaults' => array('arg2' => 'foo'), 'condition' => 'context.getMethod() == "GET"'),
                array(
'arg2' => 'defaultValue2''arg3' =>'defaultValue3')
            ),
        );
    }

    
/**
     * @dataProvider getLoadTests
     */
    
public function testLoad($className$routeDatas = array(), $methodArgs = array())
    {
        
$routeDatas array_replace(array(
            
'name'         => 'route',
            
'path'         => '/',
            
'requirements' => array(),
            
'options'      => array(),
            
'defaults'     => array(),
            
'schemes'      => array(),
            
'methods'      => array(),
            
'condition'    => null,
        ), 
$routeDatas);

        
$this->reader
            
->expects($this->once())
            ->
method('getMethodAnnotations')
            ->
will($this->returnValue(array($this->getAnnotatedRoute($routeDatas))))
        ;
        
$routeCollection $this->loader->load($className);
        
$route $routeCollection->get($routeDatas['name']);

        
$this->assertSame($routeDatas['path'], $route->getPath(), '->load preserves path annotation');
        
$this->assertSame($routeDatas['requirements'],$route->getRequirements(), '->load preserves requirements annotation');
        
$this->assertCount(0array_intersect($route->getOptions(), $routeDatas['options']), '->load preserves options annotation');
        
$this->assertSame(array_replace($methodArgs$routeDatas['defaults']), $route->getDefaults(), '->load preserves defaults annotation');
        
$this->assertEquals($routeDatas['condition'], $route->getCondition(), '->load preserves condition annotation');
    }

    private function 
getAnnotatedRoute($datas)
    {
        return new 
Route($datas);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

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