function test_getClients() { $name = "Megan"; $id = null; $test_stylist = new Stylist($name, $id); $test_stylist->save(); $stylist_id = $test_stylist->getId(); $client_name = "Shawnee"; $test_client = new Client($id, $client_name, $stylist_id); $test_client->save(); $client_name2 = "Katie"; $test_client2 = new Client($id, $client_name, $stylist_id); $test_client2->save(); $result = $test_stylist->getClients(); $this->assertEquals([$test_client, $test_client2], $result); }
function test_GetClients() { //Arrange $name = "Becky"; $id = null; $test_stylist = new Stylist($name, $id); $test_stylist->save(); $name = "Sam"; $phone = "123-456-7890"; $stylist_id = $test_stylist->getId(); $id = 1; $test_client = new Client($name, $phone, $stylist_id, $id); $test_client->save(); $name2 = "Sammy"; $phone2 = "345-567-9812"; $stylist_id2 = $test_stylist->getId(); $id = 2; $test_client2 = new Client($name, $phone, $stylist_id, $id); $test_client2->save(); //Act $result = $test_stylist->getClients(); //Assert $this->assertEquals([$test_client, $test_client2], $result); }
function testGetClients() { //Arrange $name = "Bob"; $id = null; $test_stylist = new Stylist($name, $id); $test_stylist->save(); $test_stylist_id = $test_stylist->getId(); $client_name = "Betty"; $test_client = new Client($client_name, $test_stylist_id, $id); $test_client->save(); $client_name2 = "Gertrude"; $test_client2 = new Client($client_name2, $test_stylist_id, $id); $test_client2->save(); //Act $result = $test_stylist->getClients(); //Assert $this->assertEquals([$test_client, $test_client2], $result); }
function testGetClients() { //Arrange $name = "Jackie"; $id = null; $test_stylist = new Stylist($name, $id); $test_stylist->save(); $test_stylist_id = $test_stylist->getId(); $name = "Sandra Jane"; $phone = "542-334-0984"; $style_choice = "The Rachel"; $test_client = new Client($name, $phone, $style_choice, $test_stylist_id); $test_client->save(); $name2 = "Jordy Duran"; $phone2 = "239-094-0281"; $style_choice2 = "Bowl Cut"; $test_client2 = new Client($name2, $phone2, $style_choice2, $test_stylist_id); $test_client2->save(); //Act $result = $test_stylist->getClients(); //Assert $this->assertEquals([$test_client, $test_client2], $result); }
function test_getClients() { //Arrange $name = "Sasha"; $id = null; $test_stylist = new Stylist($name, $id); $test_stylist->save(); $name2 = "Sandra"; $test_stylist2 = new Stylist($name2, $id); $test_stylist2->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(); $c_name2 = "Jerry Gergich"; $phone2 = "503-864-4444"; $stylist_id2 = $test_stylist2->getId(); $test_client2 = new Client($c_name2, $phone2, $id, $stylist_id2); $test_client2->save(); $c_name3 = "Brock Samson"; $phone3 = "555-555-5555"; $stylist_id3 = $test_stylist->getId(); $test_client3 = new Client($c_name3, $phone3, $id, $stylist_id3); $test_client3->save(); //Act $result = $test_stylist->getClients(); //Assert $this->assertEquals([$test_client3, $test_client], $result); }
function test_getClients() { $stylist_name = "Hank Airpair"; $id = null; $test_stylist = new Stylist($stylist_name, $id); $test_stylist->save(); $client_name = "Wesley Pong"; $stylist_id = $test_stylist->getId(); $email = "*****@*****.**"; $test_client = new Client($client_name, $id, $email, $stylist_id); $test_client->save(); $client_name2 = "Wendy Git"; $email = "*****@*****.**"; $test_client2 = new Client($client_name2, $id, $email, $stylist_id); $test_client2->save(); $result = $test_stylist->getClients(); $this->assertEquals([$test_client, $test_client2], $result); }
function testGetClients() { //Arrange $name = "jerry"; $id = null; $test_stylist = new Stylist($name, $id); $test_stylist->save(); $test_stylist_id = $test_stylist->getId(); $name = "kramer"; $phone = "123-321-1234"; $style_choice = "bowl cut"; $test_client = new Client($name, $phone, $style_choice, $test_stylist_id); $test_client->save(); $name2 = "ben"; $phone2 = "123-456-1234"; $style_choice2 = "trim"; $test_client2 = new Client($name2, $phone2, $style_choice2, $test_stylist_id); $test_client2->save(); //Act $result = $test_stylist->getClients(); //Assert $this->assertEquals([$test_client, $test_client2], $result); }
function testGetClients() { //Arrange $id = null; $name = "Nova"; $test_stylist = new Stylist($id, $name); $test_stylist->save(); $test_stylist_id = $test_stylist->getId(); $client_name = "Martha Stewart"; $phone = "(888) 888-8888"; $next_visit = "2015-09-06"; $test_client = new Client($id, $client_name, $phone, $next_visit, $test_stylist_id); $test_client->save(); $name2 = "Jennifer Lopez"; $phone2 = "(609) 999-9999"; $next_visit2 = "2015-10-12"; $test_client2 = new Client($id, $client_name2, $phone2, $next_visit2, $test_stylist_id); $test_client2->save(); //Act $result = $test_stylist->getClients(); //Assert $this->assertEquals([$test_client, $test_client2], $result); }
function test_GetClients() { //Arrange $stylist_name = "Big Bird"; $test_stylist = new Stylist($stylist_name); $test_stylist->save(); $test_stylist_id = $test_stylist->getId(); $client_name = "Harry Potter"; $test_client = new Client($client_name, $test_stylist_id); $test_client->save(); $client_name2 = "Spock"; $test_client2 = new Client($client_name2, $test_stylist_id); $test_client2->save(); //Act $result = $test_stylist->getClients(); //Assert $this->assertEquals([$test_client, $test_client2], $result); }
function test_getClients() { //Arrange $name = "Erin"; $id = null; $test_stylist = new Stylist($name, $id); $test_stylist->save(); $name = "George"; $stylist_id = $test_stylist->getId(); $test_client = new Client($name, $stylist_id, $id); $test_client->save(); $name2 = "Judy"; $test_client2 = new Client($name2, $stylist_id, $id); $test_client2->save(); //Act $result = $test_stylist->getClients(); //Assert $this->assertEquals([$test_client, $test_client2], $result); }
function testGetClients() { //Arrange $stylist_name = "Bilbo Baggins"; $test_stylist = new Stylist($stylist_name, $id = null); $test_stylist->save(); $test_stylist_id = $test_stylist->getId(); $client_name = "Gimli"; $test_client = new Client($client_name, $id = null, $test_stylist_id); $test_client->save(); $client_name2 = "The Necomancer"; $test_client2 = new Client($client_name2, $id = null, $test_stylist_id); $test_client2->save(); //Act $result = $test_stylist->getClients(); //Assert $this->assertEquals([$test_client, $test_client2], $result); }
function test_getClients() { //Arrange $stylist_name = "Gandalf"; $id = "null"; $test_stylist = new Stylist($stylist_name, $id); $test_stylist->save(); $test_stylist_id = $test_stylist->getId(); $client_name = "Frodo"; $test_client = new Client($client_name, $id, $test_stylist_id); $test_client->save(); $client_name2 = "Samwise"; $test_client2 = new Client($client_name2, $id, $test_stylist_id); $test_client2->save(); //Act $result = $test_stylist->getClients(); //Assert $this->assertEquals([$test_client, $test_client2], $result); }
function test_getClients() { $name = "Jane Doe"; $test_stylist = new Stylist($name); $test_stylist->save(); $name2 = "James Don"; $test_stylist2 = new Stylist($name2); $test_stylist2->save(); $client_name = "Jimmy"; $client_stylist_id = $test_stylist->getId(); $test_client = new Client($client_name, $client_stylist_id); $test_client->save(); $client_name2 = "Brea"; $client_stylist_id2 = $test_stylist2->getId(); $test_client2 = new Client($client_name, $client_stylist_id); $test_client2->save(); $result = $test_stylist->getClients(); $this->assertEquals($test_client, $result[0]); }
function test_getClients() { //Arrange // Create two stylists $iris = new Stylist("Iris", "5033428797", "Children", false); $iris->save(); $bif = new Stylist("Bif", "5033421111", "Beard Trimming", true); $bif->save(); // Create two clients for each stylist $iris_client1 = new Client("Teddy", "5023445675", $iris->getId()); $iris_client1->save(); $iris_client2 = new Client("Rachel", "6078954928", $iris->getId()); $iris_client2->save(); $bif_client1 = new Client("Harry", "0984738174", $bif->getId()); $bif_client1->save(); $bif_client2 = new Client("Sally", "8103948275", $bif->getId()); $bif_client2->save(); //Act // Get Iris' clients $result = $iris->getClients(); //Assert $this->assertEquals([$iris_client1, $iris_client2], $result); }
function testGetClients() { $name = "Bob"; $test_stylist = new Stylist($name); $test_stylist->save(); $test_client = new Client("Kevin", "555-555-5555", $test_stylist->getId()); $test_client->save(); $test_client2 = new Client("Stuart", "444-444-4444", $test_stylist->getId()); $test_client2->save(); $result = $test_stylist->getClients(); $this->assertEquals([$test_client, $test_client2], $result); }