/** * @group legacy */ public function testCreateFromFlippedChoicesDifferentValueClosure() { $choices = array(1); $list1 = new \stdClass(); $list2 = new \stdClass(); $closure1 = function () { }; $closure2 = function () { }; $this->decoratedFactory->expects($this->at(0))->method('createListFromFlippedChoices')->with($choices, $closure1)->will($this->returnValue($list1)); $this->decoratedFactory->expects($this->at(1))->method('createListFromFlippedChoices')->with($choices, $closure2)->will($this->returnValue($list2)); $this->assertSame($list1, $this->factory->createListFromFlippedChoices($choices, $closure1)); $this->assertSame($list2, $this->factory->createListFromFlippedChoices($choices, $closure2)); }