Exemplo n.º 1
0
 public function testCanUseCustomInputId()
 {
     $request = new Request(['fafafafa' => [], 'fafafafa_check_pages' => 1]);
     $listing = $this->createListingWithRequest($request);
     $bulkActions = new BulkActions($listing, $this->fields);
     $bulkActions->setId('fafafafa');
     $this->assertEquals('fafafafa', $bulkActions->getId());
     $action = $this->getMock('\\Dewdrop\\Fields\\Listing\\BulkActions\\ActionInterface', array('shouldProcess', 'process', 'render'), array($bulkActions));
     $bulkActions->add($action);
     $action->expects($this->once())->method('shouldProcess')->will($this->returnValue(true));
     $action->expects($this->once())->method('process')->with([1, 2, 3, 4, 5]);
     $bulkActions->process();
 }