コード例 #1
0
 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();
 }
コード例 #2
0
 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();
 }
コード例 #3
0
ファイル: SearchTest.php プロジェクト: hschletz/braintacle
 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();
 }
コード例 #4
0
 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();
 }
コード例 #5
0
 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();
 }
コード例 #6
0
 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/');
 }