$this->
assertNotSame($view1,
$view2);
$this->
assertEquals(new ChoiceListView(),
$view1);
$this->
assertEquals(new ChoiceListView(),
$view2);
} public function testCreateViewSameAttributesUseCache() { $attr =
['class' => 'foobar'
];
$type =
new FormType();
$list =
new ArrayChoiceList([]);
$view1 =
$this->factory->
createView($list, null, null, null, null, ChoiceList::
attr($type,
$attr));
$view2 =
$this->factory->
createView($list, null, null, null, null, ChoiceList::
attr($type,
['class' => 'foobar'
]));
$this->
assertSame($view1,
$view2);
$this->
assertEquals(new ChoiceListView(),
$view1);
$this->
assertEquals(new ChoiceListView(),
$view2);
} public function testCreateViewDifferentAttributes() { $attr1 =
['class' => 'foobar1'
];
$attr2 =
['class' => 'foobar2'
];