backend/tests/unit/RestaurantsTest.php
//criar, editar e eliminar na DB
criar, editar e eliminar na DB
criar editar e eliminar na DB
function testSavingRestaurant()
    {
        $restaurant = new Restaurant();
        $restaurant->location = 'Leiria';
        $restaurant->name = 'Foo';
        $restaurant->maxPeople = 20;
        $restaurant->currentPeople = 12;
        $restaurant->openingHour = '10:00:00';
        $restaurant->closingHour = '20:00:00';
        $restaurant->allowsPets = 1;
        $restaurant->hasVegan = 1;
        $restaurant->description = 'descricaooo';
        $restaurant->wifiPassword = 'awdd234//424';
        $restaurant->save(false);
        $this->tester->seeInDatabase('restaurant', ['name' => 'Foo']);
    }
function testSavingRestaurant ( ) { $ restaurant = new Restaurant ( ) ; $ restaurant -> location = 'Leiria' ; $ restaurant -> name = 'Foo' ; $ restaurant -> maxPeople = 20 ; $ restaurant -> currentPeople = 12 ; $ restaurant -> openingHour = '10:00:00' ; $ restaurant -> closingHour = '20:00:00' ; $ restaurant -> allowsPets = 1 ; $ restaurant -> hasVegan = 1 ; $ restaurant -> description = 'descricaooo' ; $ restaurant -> wifiPassword = 'awdd234//424' ; $ restaurant -> save ( false ) ; $ this -> tester -> seeInDatabase ( 'restaurant' , [ 'name' => 'Foo' ] ) ; }
criar, editar e eliminar na DB
criar editar e eliminar na DB