Example #1
0
	/**
	 * @covers Bedrock\View::setForm
	 * @covers Bedrock\View::getForm
	 *
	 * @return void
	 */
	public function testSetFormAndGetForm() {
		// Setup
		$mockForm = $this->getMock('Bedrock\\Common\\Form\\Generator');
		$this->_object->setForm('TestForm', $mockForm);

		// Assertions
		$this->assertAttributeContains($mockForm, '_forms', $this->_object);
		$this->assertSame($mockForm, $this->_object->getForm('TestForm'));
	}
Example #2
0
 public function save_perro($request)
 {
     $form = new FormPerro();
     $response = parent::setForm($form, $request);
     if ($response === true) {
         echo "ValidaciĆ³n correcta.";
     } else {
         echo "ValidaciĆ³n erronea.:<br>";
         var_dump($response);
     }
 }