Exemplo n.º 1
0
 function test_deleteClient()
 {
     //Arrange
     $name = "Tessa";
     $id = null;
     $test_stylist = new stylist($name, $id);
     $test_stylist->save();
     $test_stylist_id = $test_stylist->getId();
     $name = "Mai";
     $description = "Scary";
     $visits = 3;
     $name2 = "Doory";
     $description2 = "Not worth it.";
     $visits2 = 4;
     $test_client = new client($name, $test_stylist_id, $id, $visits, $description);
     $test_client2 = new client($name2, $test_stylist_id, $id, $visits2, $description2);
     $test_client->save();
     $test_client2->save();
     //Act
     $test_client->deleteClient();
     //Assert
     $this->assertEquals([$test_client2], client::getAll());
 }
Exemplo n.º 2
0
        <div class="row">

            <div class="portlet portlet-default">
                <div class="portlet-heading">
                    <div class="portlet-title">
                        <h4>عرض العملاء </h4>
                    </div>
                    <div class="clearfix"></div>

                    <?php 
if (isset($_GET['client_id']) && $_GET['client_id'] != '') {
    echo 'jdsakfjskljf';
    $id = $_GET['client_id'];
    $client_obj = new client();
    $result = $client_obj->deleteClient($con, $id);
    if ($result == 'done') {
        echo 'تم الحذف';
        //                            header("refresh:1;url=shoq.php");
    } else {
        echo 'من فضلك قم بحذف  الطلبات الخاصه بهذا العميل ';
    }
}
?>
                </div>
                <div class="portlet-body">
                    

                    <div class="table-responsive">
                        <table id="example-table" class="table table-striped table-bordered table-hover table-green">
                            <thead>