示例#1
0
 public function testAddFieldToFilterStore()
 {
     $storeId = 1;
     $expectedFilter = new DataObject(['field' => 'store', 'value' => ['in' => [1]], 'type' => 'public']);
     $this->assertSame($this->collection, $this->collection->addFieldToFilter('store_id', $storeId));
     // addition call to make sure that correct value was set to filter
     $this->assertEquals($expectedFilter, $this->collection->getFilter('store'));
 }