当前位置: 首页>>代码示例>>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;未经允许,请勿转载。