當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Store::delete方法代碼示例

本文整理匯總了PHP中Store::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP Store::delete方法的具體用法?PHP Store::delete怎麽用?PHP Store::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Store的用法示例。


在下文中一共展示了Store::delete方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Store

 function test_delete()
 {
     $name = "Foot Locker";
     $test_store = new Store($name, $id);
     $test_store->save();
     $name2 = "Foot Action";
     $test_store2 = new Store($name2, $id);
     $test_store2->save();
     $test_store->delete();
     $this->assertEquals([$test_store2], Store::getAll());
 }
開發者ID:jeffaustin81,項目名稱:shoe_store,代碼行數:11,代碼來源:StoreTest.php

示例2: testDelete

 function testDelete()
 {
     $name = "Zelds";
     $test_store = new Store($name);
     $test_store->save();
     $name = "Granite";
     $test_brand = new Brand($name);
     $test_brand->save();
     $test_store->addBrand($test_brand);
     $test_store->delete();
     $this->assertEquals([], $test_store->getBrands());
 }
開發者ID:alexMcosta,項目名稱:Shoes_Brands,代碼行數:12,代碼來源:StoreTest.php

示例3: testDeleteStore

 function testDeleteStore()
 {
     //Arrange
     $store_name = "Norstrom";
     $id = null;
     $test_store = new Store($store_name, $id);
     $test_store->save();
     $another_store = "Madewell";
     $test_store2 = new Store($another_store, $id);
     $test_store2->save();
     //Act
     $test_store->delete();
     $result = Store::getAll();
     //Assert
     $this->assertEquals([$test_store2], $result);
 }
開發者ID:kellimargaret,項目名稱:Shoe_Stores,代碼行數:16,代碼來源:StoreTest.php

示例4: testDelete

 function testDelete()
 {
     //Arrange
     $store_name = "Shoes Galore";
     $test_store = new Store($store_name);
     $test_store->save();
     $store_name2 = "Save Our Soles";
     $test_store2 = new Store($store_name);
     $test_store2->save();
     //Act
     $test_store->delete();
     $result = Store::getAll();
     //Assert
     $this->assertEquals([$test_store2], $result);
 }
開發者ID:kylepratuch,項目名稱:Shoe_Store,代碼行數:15,代碼來源:StoreTest.php

示例5: testDelete

 function testDelete()
 {
     //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);
     $test_store->save();
     $beer_name = "Bike Beer";
     $style = "Kolsch";
     $abv = 5.6;
     $ibu = 50;
     $container = "Growler";
     $brewery = "Hopworks";
     $id = 1;
     $image = "../img/test.jpg";
     $test_beer = new Beer($beer_name, $style, $abv, $ibu, $container, $brewery, $image, $id);
     $test_beer->save();
     //Act
     $test_store->addBeer($test_beer->getId());
     $test_store->delete();
     //Assert
     $this->assertEquals([], $test_beer->getStores());
 }
開發者ID:bborealis,項目名稱:growler,代碼行數:26,代碼來源:StoreTest.php

示例6: Store

 function test_delete()
 {
     //Arrange
     $store_name = "The Awesome Shoe Store";
     $test_store = new Store($store_name);
     $test_store->save();
     $brand_name = "Nike";
     $test_brand = new Brand($brand_name);
     $test_brand->save();
     //Act
     $test_store->addBrand($test_brand);
     $test_store->delete();
     //Assert
     $this->assertEquals([], $test_brand->getStores());
 }
開發者ID:kevintokheim,項目名稱:Shoe_Store,代碼行數:15,代碼來源:StoreTest.php

示例7: testDelete

 function testDelete()
 {
     //Arrange
     $store_name = "Happy Lemon";
     $id = 1;
     $test_store = new Store($store_name, $id);
     $test_store->save();
     $brand_name = "Feiyue";
     $id2 = 2;
     $test_brand = new Brand($brand_name, $id2);
     $test_brand->save();
     //Act
     $test_store->addBrand($test_brand);
     $test_store->delete();
     //Assert
     $this->assertEquals([], $test_brand->getStores());
 }
開發者ID:slmaturen,項目名稱:shoe_store,代碼行數:17,代碼來源:StoreTest.php

示例8: testDelete

 function testDelete()
 {
     //Arrange
     $name = "Clogs-N-More";
     $id = 1;
     $test_store = new Store($name, $id);
     $test_store->save();
     $name = "Nike";
     $id = 1;
     $test_brand = new Brand($name, $id);
     $test_brand->save();
     //Act
     $test_store->addBrand($test_brand);
     $test_store->delete();
     //Assert
     $this->assertEquals([], $test_brand->getStores());
 }
開發者ID:bborealis,項目名稱:shoes,代碼行數:17,代碼來源:StoreTest.php

示例9: Store

 function test_delete()
 {
     //Arrange
     $retailer = "Nordstrom";
     $address = "1234 SW Main Street";
     $phone = "123-456-7890";
     $id = null;
     $test_store = new Store($retailer, $address, $phone, $id);
     $test_store->save();
     $retailer2 = "Macys";
     $address2 = "400 SW 6th Avenue";
     $phone2 = "888-888-8888";
     $test_store2 = new Store($retailer2, $address2, $phone2, $id);
     $test_store2->save();
     //Act
     $test_store->delete();
     $result = Store::getAll();
     //Assert
     $this->assertEquals($test_store2, $result[0]);
 }
開發者ID:jcubed22,項目名稱:Shoes,代碼行數:20,代碼來源:StoreTest.php

示例10: json_encode

include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Store.php';
$action = "";
$store = new Store();
$response = array();
if (!empty($_GET['action'])) {
    $action = strip_tags($_GET['action']);
}
switch ($action) {
    case "login":
        $data = $store->login();
        break;
    case "logout":
        $data = $store->logout();
        break;
    case "add":
        $data = $store->add();
        break;
    case "delete":
        $data = $store->delete();
        break;
    case "edit":
        $data = $store->edit();
        break;
    case "search":
        $data = $store->search();
        break;
    default:
        $data = array('success' => false, 'data' => array(), 'error' => array('warning' => 'Invalid action'));
        break;
}
echo json_encode($data);
開發者ID:mayurtakawale88,項目名稱:store,代碼行數:31,代碼來源:index.php

示例11: Store

 function test_delete()
 {
     //Arrange
     $store_name = "nike store ";
     $test_store = new Store($store_name);
     $test_store->save();
     $store_name2 = "puma store ";
     $test_store2 = new Store($store_name2);
     $test_store2->save();
     //Act
     $test_store->delete();
     $result = Store::getAll();
     //Assert
     $this->assertEquals([$test_store2], $result);
 }
開發者ID:bencasalino,項目名稱:shoe-store,代碼行數:15,代碼來源:StoreTest.php

示例12: Store

 function test_delete()
 {
     //Arrange
     $name = "House of Shoes and Waffles";
     $address = "123 Street";
     $phone = "4-44";
     $test_store = new Store($name, $address, $phone);
     $test_store->save();
     $name2 = "Bob's Shoe Palace";
     $address2 = "456 Main Street";
     $phone2 = "1-800-NEW-SHOE";
     $test_store2 = new Store($name, $address, $phone);
     $test_store2->save();
     //Act
     $test_store->delete();
     $result = Store::getAll();
     //Assert
     $this->assertEquals([$test_store2], $result);
 }
開發者ID:r-hills,項目名稱:Shoes,代碼行數:19,代碼來源:StoreTest.php

示例13: __setup_autoload_clear__

 /**
  * autoload キャッシュを削除する
  **/
 public static function __setup_autoload_clear__()
 {
     Store::delete(array(__DIR__, '__autoload'));
 }
開發者ID:riaf,項目名稱:rhaco2-repository,代碼行數:7,代碼來源:AutoLoader.php

示例14: Store

 function test_delete()
 {
     //Arrange
     $name = "The Shoe Store";
     $location = "432 SW Tootsies Ave";
     $phone = "503-555-5555";
     $test_store = new Store($name, $location, $phone);
     $test_store->save();
     $name2 = "Boots n Stuff";
     $location2 = "900 WalkAlot Blvd.";
     $phone2 = "971-202-0292";
     $test_store2 = new Store($name, $location, $phone);
     $test_store2->save();
     //Act
     $test_store->delete();
     //Assert
     $result = Store::getAll();
     $this->assertEquals($test_store2, $result[0]);
 }
開發者ID:alexdbrown,項目名稱:shoe_store,代碼行數:19,代碼來源:StoreTest.php

示例15: testDeleteJoins

 function testDeleteJoins()
 {
     // Arrange
     $name = "Get Your Kicks Co.";
     $test_Store = new Store($name);
     $test_Store->save();
     $name = "Babbling Brooks";
     $test_Brand = new Brand($name);
     $test_Brand->save();
     // Act
     $test_Store->addBrand($test_Brand);
     $test_Store->delete();
     $result = $test_Brand->getStores();
     // Assert
     $this->assertEquals([], $result);
 }
開發者ID:ben-pritchard,項目名稱:Epicodus-Assessment---PHP-Many-to-Many-in-Silex,代碼行數:16,代碼來源:storeTest.php


注:本文中的Store::delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。