Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@..
Decoded Output download
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Tests\Parser\Shortcut;
use PHPUnit\Framework\TestCase;
use Symfony\Component\CssSelector\Node\SelectorNode;
use Symfony\Component\CssSelector\Parser\Shortcut\ElementParser;
/**
* @author Jean-Franois Simon <[email protected]>
*/
class ElementParserTest extends TestCase
{
/** @dataProvider getParseTestData */
public function testParse($source, $representation)
{
$parser = new ElementParser();
$selectors = $parser->parse($source);
$this->assertCount(1, $selectors);
/** @var SelectorNode $selector */
$selector = $selectors[0];
$this->assertEquals($representation, (string) $selector->getTree());
}
public static function getParseTestData()
{
return [
['*', 'Element[*]'],
['testel', 'Element[testel]'],
['testns|*', 'Element[testns|*]'],
['testns|testel', 'Element[testns|testel]'],
];
}
}
?>
Did this file decode correctly?
Original Code
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\CssSelector\Tests\Parser\Shortcut;
use PHPUnit\Framework\TestCase;
use Symfony\Component\CssSelector\Node\SelectorNode;
use Symfony\Component\CssSelector\Parser\Shortcut\ElementParser;
/**
* @author Jean-Franois Simon <[email protected]>
*/
class ElementParserTest extends TestCase
{
/** @dataProvider getParseTestData */
public function testParse($source, $representation)
{
$parser = new ElementParser();
$selectors = $parser->parse($source);
$this->assertCount(1, $selectors);
/** @var SelectorNode $selector */
$selector = $selectors[0];
$this->assertEquals($representation, (string) $selector->getTree());
}
public static function getParseTestData()
{
return [
['*', 'Element[*]'],
['testel', 'Element[testel]'],
['testns|*', 'Element[testns|*]'],
['testns|testel', 'Element[testns|testel]'],
];
}
}
Function Calls
None |
Stats
MD5 | f2c98d5c649cef7dc555fe016dc5bd2d |
Eval Count | 0 |
Decode Time | 78 ms |