Beispiel #1
0
 function testDeleteStore()
 {
     //arrange
     $name = "Store1";
     $id = 1;
     $test_store = new Store($name, $id);
     $test_store->save();
     $name2 = "Store2";
     $id2 = 2;
     $test_store2 = new Store($name2, $id2);
     $test_store2->save();
     //act
     $test_store->deleteStore();
     //assert
     $this->assertEquals([$test_store2], Store::getAll());
 }
Beispiel #2
0
 function testDeleteStore()
 {
     //Arrange
     $store_location = "Lloyd Center";
     $id = 1;
     $test_store = new Store($store_location, $id);
     $test_store->save();
     $store_location2 = "Pioneer Place";
     $id2 = 2;
     $test_store2 = new Store($store_location2, $id2);
     $test_store2->save();
     //Act
     $test_store->deleteStore();
     //Assert
     $this->assertEquals([$test_store2], Store::getAll());
 }