function test_deleteAll() { //Arrange $name = "vicki"; $test_stylist = new Stylist($name); $test_stylist->save(); //Act Stylist::deleteAll(); $result = Stylist::getAll(); //Assert $this->assertEquals([], $result); }
function test_deleteAll() { $name = "Jane Doe"; $test_stylist = new Stylist($name); $test_stylist->save(); $name2 = "James Don"; $test_stylist2 = new Stylist($name2); $test_stylist2->save(); Stylist::deleteAll(); $result = Stylist::getAll(); $this->assertEquals([], $result); }
function testDeleteAll() { $name = "Bob"; $test_stylist = new Stylist($name); $test_stylist->save(); $name2 = "Kevin"; $test_stylist2 = new Stylist($name2); $test_stylist2->save(); Stylist::deleteAll(); $result = Stylist::getAll(); $this->assertEquals([], $result); }
function test_deleteAll() { $name = "Sally"; $phone = "555-555-5555"; $id = null; $test_stylist = new Stylist($name, $phone, $id); $test_stylist->save(); $name2 = "Judy"; $test_stylist2 = new Stylist($name2, $phone, $id); $test_stylist2->save(); Stylist::deleteAll(); $result = Stylist::getAll(); $this->assertEquals([], $result); }
function test_deleteAll() { //Arrange $name = "Mark"; $name2 = "Tessa"; $test_Stylist = new Stylist($name); $test_Stylist->save(); $test_Stylist2 = new Stylist($name2); $test_Stylist2->save(); //Act Stylist::deleteAll(); $result = Stylist::getAll(); //Assert $this->assertEquals([], $result); }
function testDeleteAll() { //Arrange $name = "Bob"; $name2 = "Harry"; $test_stylist = new Stylist($name); $test_stylist->save(); $test_stylist2 = new Stylist($name2); $test_stylist2->save(); //Act Stylist::deleteAll(); $result = Stylist::getAll(); //Assert $this->assertEquals([], $result); }
function test_deleteAll() { //arrange $stylist_name = "Agnes"; $test_stylist = new Stylist($stylist_name); $test_stylist->save(); $stylist_name2 = "Cathy"; $test_stylist2 = new Stylist($stylist_name2); $test_stylist2->save(); //act Stylist::deleteAll(); $result = Stylist::getAll(); //assert $this->assertEquals([], $result); }
function test_deleteAll() { //Arrange $stylist_name = "Donna"; $stylist_name2 = "Ronda"; $test_stylist = new Stylist($stylist_name); $test_stylist->save(); $test_stylist2 = new Stylist($stylist_name); $test_stylist->save(); //Act Stylist::deleteAll(); $result = Stylist::getAll(); //Assert $this->assertEquals([], $result); }
function test_deleteAll() { //Arrange $stylist_name = "Big Bird"; $test_stylist = new Stylist($stylist_name); $test_stylist->save(); $stylist_name2 = "Araya Stark"; $test_stylist2 = new Stylist($stylist_name2); $test_stylist2->save(); //Act $result = Stylist::deleteAll(); $result = Stylist::getAll(); //Assert $this->assertEquals([], $result); }
function testDeleteAll() { //Arrange $id = null; $name = "Kourtney"; $test_stylist = new Stylist($id, $name); $test_stylist->save(); $name2 = "Xavier"; $test_stylist2 = new Stylist($id, $name2); $test_stylist2->save(); //Act Stylist::deleteAll(); //Assert $result = Stylist::getAll(); $this->assertEquals([], $result); }
function testDeleteAll() { //Arrange $name = "Michael"; $id = null; $test_stylist = new Stylist($name, $id); $test_stylist->save(); $name2 = "John"; $id2 = null; $test_stylist2 = new Stylist($name2, $id2); $test_stylist2->save(); //Act Stylist::deleteAll(); //Assert $result = Stylist::getAll(); $this->assertEquals([], $result); }
function testDeleteAll() { //Arrange $stylist_name = "Happy Lemon"; $id = 1; $test_stylist = new Stylist($stylist_name, $id); $test_stylist->save(); $stylist_name2 = "Chatime"; $id2 = 2; $test_stylist2 = new Stylist($stylist_name2, $id2); $test_stylist2->save(); //Act Stylist::deleteAll(); //Assert $result = Stylist::getAll(); $this->assertEquals([], $result); }
protected function tearDown() { Stylist::deleteAll(); Client::deleteAll(); }
$stylist_id = $_POST['stylist_id']; $client = new Client($client_name, $id = null, $stylist_id); $client->save(); $stylist = Stylist::find($stylist_id); return $app['twig']->render('stylist.html.twig', array('stylist' => $stylist, 'clients' => $stylist->getClients())); }); //Allows the user to add stylists to the list on the front page $app->post("/stylists", function () use($app) { $stylist = new Stylist($_POST['stylist_name']); $stylist->save(); return $app['twig']->render('index.html.twig', array('stylists' => Stylist::getAll())); }); //Allows the user to delete the list of stylists on the front page //Error: Variable 'stylists' does not exist in 'stylists.html.twig' at line 11 $app->post("/delete_stylists", function () use($app) { Stylist::deleteAll(); return $app['twig']->render('stylists.html.twig'); }); //route which allows the user to edit one stylist $app->get("/stylists/{id}/edit", function ($id) use($app) { $stylist = Stylist::find($id); return $app['twig']->render('stylist_edit.html.twig', array('stylist' => $stylist)); }); //allows the user to use the update method $app->patch("/stylists/{id}", function ($id) use($app) { $stylist_name = $_POST['stylist_name']; $stylist = Stylist::find($id); $stylist->update($stylist_name); return $app['twig']->render('stylist.html.twig', array('stylist' => $stylist, 'clients' => $stylist->getClients())); }); //allows the user to delete a stylist
function test_deleteAll() { //Arrange $name = "Brenda"; $test_stylist = new Stylist($name); $test_stylist->save(); $name2 = "Eduardo"; $test_stylist2 = new Stylist($name); $test_stylist2->save(); //Act Stylist::deleteAll(); $result = Stylist::getAll(); //Assert $this->assertEquals([], $result); }
function test_deleteAll() { //Arrange $stylist1 = new Stylist("Iris", "5033428797", "Children", false); $stylist1->save(); $stylist2 = new Stylist("Bif", "5033421111", "Beard Trimming", true); $stylist2->save(); //Act Stylist::deleteAll(); $result = Stylist::getAll(); //Assert $this->assertEquals([], $result); }