예제 #1
0
 public function testAddValueSortToCollectionNotGlobal()
 {
     $this->attributeModel->expects($this->any())->method('isScopeGlobal')->will($this->returnValue(false));
     $this->collection->expects($this->once())->method('order')->with('check_sql asc')->will($this->returnSelf());
     $this->collection->expects($this->once())->method('getStoreId')->will($this->returnValue(1));
     $this->collection->expects($this->any())->method('getConnection')->will($this->returnSelf());
     $this->collection->expects($this->any())->method('getCheckSql')->will($this->returnValue('check_sql'));
     $this->attributeModel->expects($this->any())->method('getEntity')->willReturn($this->entity);
     $this->entity->expects($this->once())->method('getLinkField')->willReturn('entity_id');
     $this->status->setAttribute($this->attributeModel);
     $this->status->addValueSortToCollection($this->collection);
 }