本文整理汇总了PHP中Client::getStylistId方法的典型用法代码示例。如果您正苦于以下问题:PHP Client::getStylistId方法的具体用法?PHP Client::getStylistId怎么用?PHP Client::getStylistId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Client
的用法示例。
在下文中一共展示了Client::getStylistId方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetStylistId
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);
}
示例2: Stylist
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);
}
示例3: Stylist
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);
}
示例4: Stylist
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));
}
示例5: Stylist
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));
}
示例6: testGetStylistId
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));
}
示例7: Stylist
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));
}
示例8: Stylist
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));
}
示例9: Stylist
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));
}
示例10: Stylist
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));
}
示例11: Stylist
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);
}
示例12: Stylist
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));
}
示例13: Stylist
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');
}
示例14: Stylist
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));
}
示例15: array
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());