public function testMultiArrayAccessMethodChain() { $node = new Document(); $model = new ContentModel(); $node->setData('foo', [1 => [2 => $model]]); $this->assertEquals($model->getCssClass(), ExpressionEvaluator::evaluate($node, 'foo[1]->bar[2]->getCssClass()')); }
public function testSimpleCall() { $model = new ContentModel(); $expression = new MethodEvaluationExpression('getCssClass()', $model); $this->assertEquals($model->getCssClass(), $expression->getResult()); }