/** * Test for FormDisplay::process * * @return void */ public function testProcess() { $this->assertFalse($this->object->process(true, true)); $this->object = $this->getMockBuilder('FormDisplay')->disableOriginalConstructor()->setMethods(array('save'))->getMock(); $attrForms = new \ReflectionProperty('FormDisplay', '_forms'); $attrForms->setAccessible(true); $attrForms->setValue($this->object, array(1, 2, 3)); $this->object->expects($this->once())->method('save')->with(array(0, 1, 2), false)->will($this->returnValue(true)); $this->assertTrue($this->object->process(false, false)); $attrForms->setValue($this->object, array()); $this->assertFalse($this->object->process(false, false)); }