!C99Shell v. 1.0 pre-release build #13!

Software: Apache. PHP/5.5.15 

uname -a: Windows NT SVR-DMZ 6.1 build 7600 (Windows Server 2008 R2 Enterprise Edition) i586 

SYSTEM 

Safe-mode: OFF (not secure)

C:\dmz\php\pear\Symfony\Component\Yaml\Tests\   drwxrwxrwx
Free 3.24 GB of 39.52 GB (8.2%)
Detected drives: [ a ] [ c ] [ d ] [ e ] [ f ]
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     DumperTest.php (5.15 KB)      -rw-rw-rw-
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\Yaml\Tests;

use 
Symfony\Component\Yaml\Yaml;
use 
Symfony\Component\Yaml\Parser;
use 
Symfony\Component\Yaml\Dumper;

class 
DumperTest extends \PHPUnit_Framework_TestCase
{
    protected 
$parser;
    protected 
$dumper;
    protected 
$path;

    protected 
$array = array(
        
'' => 'bar',
        
'foo' => '#bar',
        
'foo\'bar' => array(),
        
'bar' => array(1'foo'),
        
'foobar' => array(
            
'foo' => 'bar',
            
'bar' => array(1'foo'),
            
'foobar' => array(
                
'foo' => 'bar',
                
'bar' => array(1'foo'),
            ),
        ),
    );

    protected function 
setUp()
    {
        
$this->parser = new Parser();
        
$this->dumper = new Dumper();
        
$this->path __DIR__.'/Fixtures';
    }

    protected function 
tearDown()
    {
        
$this->parser null;
        
$this->dumper null;
        
$this->path null;
        
$this->array null;
    }

    public function 
testSetIndentation()
    {
        
$this->dumper->setIndentation(7);

$expected = <<<EOF
'': bar
foo: '#bar'
'foo''bar': {  }
bar:
       - 1
       - foo
foobar:
       foo: bar
       bar:
              - 1
              - foo
       foobar:
              foo: bar
              bar:
                     - 1
                     - foo

EOF;
        
$this->assertEquals($expected$this->dumper->dump($this->array40));
    }

    public function 
testSpecifications()
    {
        
$files $this->parser->parse(file_get_contents($this->path.'/index.yml'));
        foreach (
$files as $file) {
            
$yamls file_get_contents($this->path.'/'.$file.'.yml');

            
// split YAMLs documents
            
foreach (preg_split('/^---( %YAML\:1\.0)?/m'$yamls) as $yaml) {
                if (!
$yaml) {
                    continue;
                }

                
$test $this->parser->parse($yaml);
                if (isset(
$test['dump_skip']) && $test['dump_skip']) {
                    continue;
                } elseif (isset(
$test['todo']) && $test['todo']) {
                    
// TODO
                
} else {
                    
$expected = eval('return '.trim($test['php']).';');

                    
$this->assertEquals($expected$this->parser->parse($this->dumper->dump($expected10)), $test['test']);
                }
            }
        }
    }

    public function 
testInlineLevel()
    {
        
$expected = <<<EOF
{ '': bar, foo: '#bar', 'foo''bar': {  }, bar: [1, foo], foobar: { foo: bar, bar: [1, foo], foobar: { foo: bar, bar: [1, foo] } } }
EOF;
$this->assertEquals($expected$this->dumper->dump($this->array, -10), '->dump() takes an inline level argument');
$this->assertEquals($expected$this->dumper->dump($this->array0), '->dump() takes an inline level argument');

$expected = <<<EOF
'': bar
foo: '#bar'
'foo''bar': {  }
bar: [1, foo]
foobar: { foo: bar, bar: [1, foo], foobar: { foo: bar, bar: [1, foo] } }

EOF;
        
$this->assertEquals($expected$this->dumper->dump($this->array1), '->dump() takes an inline level argument');

        
$expected = <<<EOF
'': bar
foo: '#bar'
'foo''bar': {  }
bar:
    - 1
    - foo
foobar:
    foo: bar
    bar: [1, foo]
    foobar: { foo: bar, bar: [1, foo] }

EOF;
        
$this->assertEquals($expected$this->dumper->dump($this->array2), '->dump() takes an inline level argument');

        
$expected = <<<EOF
'': bar
foo: '#bar'
'foo''bar': {  }
bar:
    - 1
    - foo
foobar:
    foo: bar
    bar:
        - 1
        - foo
    foobar:
        foo: bar
        bar: [1, foo]

EOF;
        
$this->assertEquals($expected$this->dumper->dump($this->array3), '->dump() takes an inline level argument');

        
$expected = <<<EOF
'': bar
foo: '#bar'
'foo''bar': {  }
bar:
    - 1
    - foo
foobar:
    foo: bar
    bar:
        - 1
        - foo
    foobar:
        foo: bar
        bar:
            - 1
            - foo

EOF;
        
$this->assertEquals($expected$this->dumper->dump($this->array4), '->dump() takes an inline level argument');
        
$this->assertEquals($expected$this->dumper->dump($this->array10), '->dump() takes an inline level argument');
    }

    public function 
testObjectSupportEnabled()
    {
        
$dump $this->dumper->dump(array('foo' => new A(), 'bar' => 1), 00falsetrue);

        
$this->assertEquals('{ foo: !!php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}, bar: 1 }'$dump'->dump() is able to dump objects');
    }

    public function 
testObjectSupportDisabledButNoExceptions()
    {
        
$dump $this->dumper->dump(array('foo' => new A(), 'bar' => 1));

        
$this->assertEquals('{ foo: null, bar: 1 }'$dump'->dump() does not dump objects when disabled');
    }

    
/**
     * @expectedException \Symfony\Component\Yaml\Exception\DumpException
     */
    
public function testObjectSupportDisabledWithExceptions()
    {
        
$this->dumper->dump(array('foo' => new A(), 'bar' => 1), 00truefalse);
    }
}

class 
A
{
    public 
$a 'foo';
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0156 ]--