public function setUp() { $fields = array('TAG' => 'text', 'name0' => 'text', 'name1' => 'integer'); $this->_customFieldManager = $this->getMockBuilder('Model\\Client\\CustomFieldManager')->disableOriginalConstructor()->getMock(); $this->_customFieldManager->expects($this->once())->method('getFields')->willReturn($fields); parent::setUp(); }
public function setUp() { $fields = array('TAG' => 'text', 'name0' => 'text', 'name1' => 'integer'); $this->_customFieldManager = $this->createMock('Model\\Client\\CustomFieldManager'); $this->_customFieldManager->expects($this->once())->method('getFields')->willReturn($fields); parent::setUp(); }
public function setUp() { $resultSet = new \Zend\Db\ResultSet\ResultSet(); $resultSet->initialize(array(array('Name' => 'RegValue'))); $this->_registryManager = $this->createMock('Model\\Registry\\RegistryManager'); $this->_registryManager->expects($this->once())->method('getValueDefinitions')->willReturn($resultSet); $this->_customFieldManager = $this->createMock('Model\\Client\\CustomFieldManager'); $this->_customFieldManager->expects($this->once())->method('getFields')->will($this->returnValue(array('TAG' => 'text', 'Clob' => 'clob', 'Integer' => 'integer', 'Float' => 'float', 'Date' => 'date'))); parent::setUp(); }
public function setUp() { $this->_customFieldManager = $this->getMockBuilder('Model\\Client\\CustomFieldManager')->disableOriginalConstructor()->getMock(); $this->_customFieldManager->expects($this->once())->method('getFields')->willReturn(array('TAG' => 'text', 'Clob' => 'clob', 'Integer' => 'integer', 'Float' => 'float', 'Date' => 'date')); parent::setUp(); }
public function setUp() { $this->_customFieldManager = $this->createMock('Model\\Client\\CustomFieldManager'); $this->_customFieldManager->expects($this->once())->method('getFields')->willReturn(array('TAG' => 'text', 'Clob' => 'clob', 'Integer' => 'integer', 'Float' => 'float', 'Date' => 'date')); parent::setUp(); }
public function testDeletefieldActionPostYes() { $this->_customFieldManager->expects($this->once())->method('deleteField')->with('Name'); $this->dispatch('/console/preferences/deletefield/?name=Name', 'POST', array('yes' => 'Yes')); $this->assertRedirectTo('/console/preferences/customfields/'); }