createArrayNode example



namespace Symfony\Component\ExpressionLanguage\Tests\Node;

use Symfony\Component\ExpressionLanguage\Node\ArrayNode;
use Symfony\Component\ExpressionLanguage\Node\ConstantNode;

class ArrayNodeTest extends AbstractNodeTestCase
{
    public function testSerialization()
    {
        $node = $this->createArrayNode();
        $node->addElement(new ConstantNode('foo'));

        $serializedNode = serialize($node);
        $unserializedNode = unserialize($serializedNode);

        $this->assertEquals($node$unserializedNode);
        $this->assertNotEquals($this->createArrayNode()$unserializedNode);
    }

    public static function getEvaluateData(): array
    {
        
Home | Imprint | This part of the site doesn't use cookies.