Пример #1
0
 function testDeleteAll()
 {
     //Arrange
     $id = null;
     $name = "Lip Blaster";
     $type = "IPA";
     $abv = 4.2;
     $ibu = 10;
     $region = "Pacific Northwest";
     $brewery_id = 1;
     $test_beer = new Beer($id, $name, $type, $abv, $ibu, $region, $brewery_id);
     $test_beer->save();
     $id = null;
     $name = "Hip Hops";
     $type = "Pale Ale";
     $abv = 3.2;
     $ibu = 4;
     $region = "South Central LA";
     $brewery_id = 2;
     $test_beer2 = new Beer($id, $name, $type, $abv, $ibu, $region, $brewery_id);
     $test_beer2->save();
     //Act
     Beer::deleteAll();
     //Assert
     $result = Beer::getAll();
     $this->assertEquals([], $result);
 }
Пример #2
0
 function test_deleteAll()
 {
     //arrange
     $beer_name = "Your mom";
     $style = "IPA";
     $abv = 4;
     $ibu = 6;
     $container = "bottle";
     $brewery = "daddy";
     $image = "../img/test.jpg";
     $test_beer = new Beer($beer_name, $style, $abv, $ibu, $container, $brewery, $image);
     $test_beer->save();
     $beer_name2 = "Your mom2";
     $style2 = "IPA2";
     $abv2 = 12;
     $ibu2 = 7;
     $container2 = "bottle2";
     $brewery2 = "daddy2";
     $image2 = "../img/test2.jpg";
     $test_beer2 = new Beer($beer_name2, $style2, $abv2, $ibu2, $container2, $brewery2, $image2);
     $test_beer2->save();
     //Act
     Beer::deleteAll();
     //Assert
     $result = Beer::getAll();
     $this->assertEquals([], $result);
 }
Пример #3
0
 protected function tearDown()
 {
     Pub::deleteAll();
     Beer::deleteAll();
 }
Пример #4
0
 protected function tearDown()
 {
     Store::deleteAll();
     Beer::deleteAll();
 }
Пример #5
0
 protected function tearDown()
 {
     Brewery::deleteAll();
     Beer::deleteAll();
     Pub::deleteAll();
 }