protected function tearDown() { Patron::deleteAll(); Token::deleteAll(); Bar::deleteAll(); Item::deleteAll(); }
function testDeleteAll() { $name = "Side Street"; $phone = "555-555-5555"; $address = "123 ABC. Street"; $website = "http://www.sidestreetpdx.com"; $test_bar = new Bar($name, $phone, $address, $website); $test_bar->save(); $name2 = "ABC Pub"; $phone2 = "444-444-4444"; $address2 = "321 CBA Street"; $website2 = "http://www.sesamestreet.com"; $test_bar2 = new Bar($name2, $phone2, $address2, $website2); $test_bar2->save(); Bar::deleteAll(); $result = Bar::getAll(); $this->assertEquals([], $result); }