function testUpdate() { //Arrange $store_name = "Chill N Fill"; $id = 1; $category = "bar"; $region = "North Portland"; $address = "5215 N Lombard Portland, OR 97203"; $test_store = new Store($store_name, $category, $region, $address, $id); $test_store->save(); $new_store_name = "Fill N Chill"; $new_category = "bottleshop"; $new_region = "SW Portland"; $new_address = "5215 N Chautauqua Blvd Portland, OR 97203"; //Act $test_store->update($new_store_name, $new_category, $new_region, $new_address); //Assert $this->assertEquals("Fill N Chill", $test_store->getStoreName()); $this->assertEquals("bottleshop", $test_store->getCategory()); $this->assertEquals("SW Portland", $test_store->getRegion()); $this->assertEquals("5215 N Chautauqua Blvd Portland, OR 97203", $test_store->getAddress()); }
<!-- Header --> <header id="header" role="heading"> <div class="sf-contener clearfix "> <nav class="nav-wrap container_9"> <ul class="sf-menu clearfix "> <li class="first-logo-item "><a title="Shoppik" href="home.php" class="logo "><img width="145" height="59" alt="logo" src="media/logo.jpg"></a></li> <?php $store = new Store($db); $categories = $store->getCategory(); foreach ($categories as $category) { echo '<li><a href="product-grid.php?idCategory=' . $category['id_categorie'] . '">' . str_replace(' ', '<br>', utf8_encode($category['libelle_cat'])) . '</a> <ul>'; $subCategories = $store->getSubCategoryByIdCategory($category['id_categorie']); echo '<li></li>'; foreach ($subCategories as $subCategory) { echo '<li><a href="product-grid2.php?idSubCategory=' . $subCategory['id_ss_categorie'] . '">' . utf8_encode($subCategory['libelle_ss_categorie']) . '</a></li>'; } echo ' </ul> </li>'; } ?> <li style="float:right" class="sf-search noBack"> <form method="get" id="searchbox" action="search-grid.php"> <input type="text" placeholder="Rechercher" value="" name="search_query"> </form> </li> </ul> </nav> </div> </header>