Пример #1
0
 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()'));
 }
 private function getDocument($dataAttributeName)
 {
     $document = new Document();
     $document->setData($dataAttributeName, new ContentModel());
     return $document;
 }