public function testDetroy($id) { //DB::table('users')->where ('id')->delete(); $destino = Enhance::getCodeCoverageWrapper('HomeControllerClass'); $destino->destroy(id); $this->assertEquals(DB::table('users')->find(id), null); }
public function testPost_logueados() { $destino = Enhance::getCodeCoverageWrapper('logueadosControllerClass'); $destino->post_logueados(); $this->call('GET', 'logueados', array('eventos' => $cine)); $this->assertResponseOk(); }
public function testpostRegistroFalla() { $destino = Enhance::getCodeCoverageWrapper('RegistroControllerClass'); $destino->postRegistro(); $validator->fails(); $this->call('POST', '/registro'); $this->assertSessionHasErrors(); }
public function testPost_logueados() { //$cine = DB::select('select * from eventos where tipo=?',array(Input::get('tipo'))); $destino = Enhance::getCodeCoverageWrapper('logueadosControllerClass'); $destino->post_logueados(); $this->call('GET', 'logueados', array('eventos' => $cine)); $this->assertResponseOk(); }
public function testDestroy($id) { $destino = Enhance::getCodeCoverageWrapper('BorraControllerClass'); $destino->destroy($id); $this->assertEquals(User::find($id), null); $this->call('GET', 'eventosadmin'); $this->assertResponseOk(); }
protected function testSetUpLayout() { //if ( ! is_null($this->layout)){ //{ //$this->layout = View::make($this->layout); //} $destino = Enhance::getCodeCoverageWrapper('BaseControllerClass'); $destino->setUpLayout(); assertEquals($this, parent::setupLayout); }
public function testPostEventoCorrecto() { $destino = Enhance::getCodeCoverageWrapper('EventosControllerClass'); $destino->postEvento(); $eventos = new Evento(); $eventos->nombre = 'Concierto Dani Martin'; $eventos->fecha = '2014-08-01'; $eventos->hora = '23:30'; $eventos->tipo = 'musica'; $eventos->aforo = '1000'; $eventos->descripcion = 'concierto del ex-cantante de ECDL en Berja'; $eventos->save(); $this->call('POST', 'eventos'); $this->assertRedirectedToRoute('eventos'); }
public function testPostEventoCorrecto() { $destino = Enhance::getCodeCoverageWrapper('EventosControllerClass'); $destino->postEvento(); $eventos = new Evento(); $eventos->nombre = 'Concirto David Bisbal'; $eventos->fecha = '2014-08-14'; $eventos->hora = '23:00'; $eventos->tipo = 'B'; $eventos->aforo = '1000'; $eventos->descripcion = 'Concierto del famoso almeriense David Bisbal en Vera (Almeria)'; $eventos->save(); $this->call('POST', 'eventos'); $this->assertRedirectedToRoute('eventos'); }
protected function testSetUpLayout() { $destino = Enhance::getCodeCoverageWrapper('BaseControllerClass'); $destino->setUpLayout(); assertEquals($this, parent::setupLayout); }
public function testLogOut() { $destino = Enhance::getCodeCoverageWrapper('AuthControllerClass'); $destino->logOut(); $this->assertRedirectedTo('/login'); }