query ->expects($this->once()) ->method('filterById') ->with(array(1, 2)) ->will($this->returnSelf()) ; ItemQuery::$result = array( $this->item2, $this->item1, ); parent::testGetChoicesForValues(); } protected function setUp() { $this->query = $this->getMock('Propel\Bundle\PropelBundle\Tests\Fixtures\ItemQuery', array( 'filterById', ), array(), '', true, true, true, false, true); $this->query ->expects($this->any()) ->method('filterById') ->with($this->anything()) ->will($this->returnSelf()) ; $this->createItems(); ItemQuery::$result = array( $this->item1, $this->item2, $this->item3, $this->item4, ); parent::setUp(); } protected function createItems() { $this->item1 = new Item(1, 'Foo'); $this->item2 = new Item(2, 'Bar'); $this->item3 = new Item(3, 'Baz'); $this->item4 = new Item(4, 'Cuz'); } protected function createChoiceList() { return new ModelChoiceList(self::ITEM_CLASS, 'value', null, $this->query); } protected function getChoices() { return array( 1 => $this->item1, 2 => $this->item2, 3 => $this->item3, 4 => $this->item4, ); } protected function getLabels() { return array( 1 => 'Foo', 2 => 'Bar', 3 => 'Baz', 4 => 'Cuz', ); } protected function getValues() { return array( 1 => '1', 2 => '2', 3 => '3', 4 => '4', ); } protected function getIndices() { return array( 1, 2, 3, 4, ); } }