function testGetStylistId() { $name = "Stuart"; $phone = "555-555-5555"; $stylist_id = 1; $test_client = new Client($name, $phone, $stylist_id); $result = $test_client->getStylistId(); $this->assertEquals($stylist_id, $result); }
function test_getStylistId() { $name = "Jane Doe"; $test_stylist = new Stylist($name); $test_stylist->save(); $client_name = "Jimmy"; $id = 1; $client_stylist_id = $test_stylist->getId(); $test_client = new Client($client_name, $client_stylist_id); $result = $test_client->getStylistId(); $this->assertEquals($client_stylist_id, $result); }
function test_getStylistId() { //Arrange $client_name = "Bill Withers"; $client_phone = "5415134876"; $stylist = new Stylist("Diane", "5035528959", "MPB", false); $stylist->save(); $client = new Client($client_name, $client_phone, $stylist->getId()); //Act $result = $client->getStylistId(); //Assert $this->assertEquals($stylist->getId(), $result); }
function test_getClientId() { $name = "Megan"; $id = null; $test_stylist = new Stylist($name, $id); $test_stylist->save(); $client_name = "Shawnee"; $stylist_id = $test_stylist->getId(); $test_client = new Client($client_name, $id, $stylist_id); $test_client->save(); $result = $test_client->getStylistId(); $this->assertEquals(true, is_numeric($result)); }
function test_getStylistId() { $name = "Sally"; $phone = "555-555-5555"; $id = null; $test_stylist = new Stylist($name, $phone, $id); $test_stylist->save(); $name = "Maggie"; $phone = "123-321-1234"; $stylist_id = $test_stylist->getId(); $test_client = new Client($name, $phone, $id, $stylist_id); $test_client->save(); $result = $test_client->getStylistId(); $this->assertEquals(true, is_numeric($result)); }
function testGetStylistId() { //Arrange $stylist_name = "Sauron"; $test_stylist = new Stylist($stylist_name, $id = null); $test_stylist->save(); $client_name = "Bilbo Baggins"; $stylist_id = $test_stylist->getId(); $test_client = new Client($client_name, $id = null, $stylist_id); $test_client->save(); //Act $result = $test_client->getStylistId(); //Assert $this->assertEquals(true, is_numeric($result)); }
function test_getStylistId() { //Arrange $stylist_name = "Big Bird"; $id = null; $test_stylist = new Stylist($stylist_name, $id); $test_stylist->save(); $client_name = "Harry Potter"; $stylist_id = $test_stylist->getId(); $test_client = new Client($client_name, $stylist_id); $test_client->save(); //Act $result = $test_client->getStylistId(); //Assert $this->assertEquals(true, is_numeric($result)); }
function test_getStylistId() { //Arrange $name = "Stylist1"; $id = null; $test_stylist = new Stylist($name, $id); $test_stylist->save(); $name = "Client1"; $stylist_id = $test_stylist->getId(); $test_client = new Client($name, $id, $stylist_id); $test_client->save(); //Act $result = $test_client->getStylistId(); //Assert $this->assertEquals(true, is_numeric($result)); }
function test_getCategoryId() { //Arrange $stylist_name = "john"; $id = null; $test_stylist = new Stylist($stylist_name, $id); $test_stylist->save(); $client_name = "jack"; $stylist_id = $test_stylist->getId(); $test_client = new Client($client_name, $id, $stylist_id); $test_client->save(); //Act $result = $test_client->getStylistId(); //Assert $this->assertEquals(true, is_numeric($result)); }
function test_getStylistId() { //arrange $stylist_name = "Lisa"; $id = null; $test_stylist = new Stylist($stylist_name, $id); $test_stylist->save(); $client_name = "Alfred"; $stylist_id = $test_stylist->getId(); $test_client = new Client($client_name, $id, $stylist_id); $test_client->save(); //act $result = $test_client->getStylistId(); //assert $this->assertEquals(true, is_numeric($result)); }
function test_getStylistId() { //Arrange $name = "Erin"; $id = null; $test_stylist = new Stylist($name, $id); $test_stylist->save(); $name = "George"; $id = null; $stylist_id = $test_stylist->getId(); $test_client = new Client($name, $stylist_id); $test_client->save(); //Act $result = $test_client->getStylistId(); //Assert $this->assertEquals($stylist_id, $result); }
function test_getStylistId() { //Arrange $name = "Becky"; $id = null; $test_stylist = new Stylist($name, $id); $test_stylist->save(); $client = "Jim"; $phone = "123-456-7890"; $stylist_id = $test_stylist->getId(); $test_stylist = new Client($client, $phone, $stylist_id, $id); $test_stylist->save(); //Act $result = $test_stylist->getStylistId(); //Assert $this->assertEquals(true, is_numeric($result)); }
function test_client_getTest() { //Arrange $name = "Vidal Sassoon"; $id = null; $test_stylist = new Stylist($name, $id); $test_stylist->save(); $name2 = "Mr. T"; $stylist_id = $test_stylist->getId(); $test_client = new Client($name2, $stylist_id, null); $test_client->save(); //Act $result = $test_client->getName(); $result2 = $test_client->getStylistId(); //Assert $this->assertEquals($name2, $result, 'name'); $this->assertEquals($stylist_id, $result2, 'stylist_id'); }
function test_getStylistId() { //Arrange $name = "Jackie"; $id = null; $test_stylist = new Stylist($name, $id); $test_stylist->save(); $name = "Sandra Jane"; $phone = "542-334-0984"; $style_choice = "The Rachel"; $stylist_id = 1; $id = null; $test_client = new Client($name, $phone, $style_choice, $stylist_id, $id); //Act $result = $test_client->getStylistId(); //Assert $this->assertEquals(true, is_numeric($result)); }
function test_getStylistId() { //Arrange $name = "ben"; $id = null; $test_stylist = new Stylist($name, $id); $test_stylist->save(); $name = "joe"; $phone = "123-456-7890"; $style_choice = "cut"; $stylist_id = 1; $id = null; $test_client = new Client($name, $phone, $style_choice, $stylist_id, $id); //Act $result = $test_client->getStylistId(); //Assert $this->assertEquals(true, is_numeric($result)); }
return $app['twig']->render('stylist_edit.html.twig', array('stylist' => $stylist)); }); $app->patch("/stylists/{id}", function ($id) use($app) { $stylist = Stylist::find($id); $stylist->update($_POST['name']); return $app['twig']->render('stylist.html.twig', array('stylist' => $stylist, 'clients' => $stylist->getClients())); }); $app->delete("/stylists/{id}", function ($id) use($app) { $stylist = Stylist::find($id); $stylist->delete(); return $app['twig']->render('index.html.twig', array('stylists' => Stylist::getAll())); }); $app->post("/clients", function () use($app) { $client = new Client($_POST['name'], $_POST['stylist_id']); $client->save(); $stylist = Stylist::find($client->getStylistId()); return $app['twig']->render('stylist.html.twig', array('stylist' => $stylist, 'clients' => $stylist->getClients())); }); $app->get("/clients/{id}/edit", function ($id) use($app) { $client = Client::find($id); return $app['twig']->render('client_edit.html.twig', array('client' => $client)); }); $app->patch("/clients/{id}", function ($id) use($app) { $client = Client::find($id); $client->update($_POST['name'], $_POST['stylist_id']); $stylist = Stylist::find($client->getStylistId()); return $app['twig']->render('stylist.html.twig', array('stylist' => $stylist, 'clients' => $stylist->getClients())); }); $app->delete("/clients/{id}", function ($id) use($app) { $client = Client::find($id); $stylist = Stylist::find($client->getStylistId());
function test_getStylistId() { //Arrange $name = "Sasha"; $id = null; $test_stylist = new Stylist($name, $id); $test_stylist->save(); $c_name = "Garry Gergich"; $phone = "503-472-8959"; $stylist_id = $test_stylist->getId(); $test_client = new Client($c_name, $phone, $id, $stylist_id); $test_client->save(); //Act $result = $test_client->getStylistId(); //Assert $this->assertEquals($stylist_id, $result); }