本文整理汇总了PHP中Brand::deleteAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Brand::deleteAll方法的具体用法?PHP Brand::deleteAll怎么用?PHP Brand::deleteAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Brand
的用法示例。
在下文中一共展示了Brand::deleteAll方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_deleteAll
function test_deleteAll()
{
//Arrange
$brand_name = "Nike";
$test_brand = new Brand($brand_name);
$test_brand->save();
//Act
Brand::deleteAll();
$result = $test_brand->getAll();
//Assert
$this->assertEquals([], $result);
}
示例2: test_deleteAll
function test_deleteAll()
{
//Arrange
$name = "Nike";
$test_brand = new Brand($name);
$test_brand->save();
$name2 = "Adidas";
$test_brand2 = new Brand($name2);
$test_brand2->save();
//Act
Brand::deleteAll();
$result = Brand::getAll();
//Assert
$this->assertEquals([], $result);
}
示例3: test_deleteAll
function test_deleteAll()
{
//Arrange
$name = "Crocs";
$test_brand = new Brand($name);
$test_brand->save();
$name2 = "Doc Martins";
$test_brand2 = new Brand($name);
$test_brand2->save();
//Act
Brand::deleteAll();
//Assert
$result = Brand::getAll();
$this->assertEquals([], $result);
}
示例4: testDeleteAll
function testDeleteAll()
{
//Arrange
$brand_name = "Super Kicks";
$test_brand = new Brand($brand_name);
$test_brand->save();
$brand_name2 = "Cool Shoes";
$test_brand2 = new Brand($brand_name2);
$test_brand->save();
//Act
Brand::deleteAll();
$result = Brand::getAll();
//Assert
$this->assertEquals([], $result);
}
示例5: testDeleteAll
function testDeleteAll()
{
//Arrange
$brand_name = "Sketchers";
$test_brand = new Brand($brand_name);
$test_brand->save();
$another_brand = "Doc Martin";
$test_brand2 = new Brand($another_brand);
$test_brand2->save();
//Act
Brand::deleteAll();
$result = Brand::getAll();
//Assert
$this->assertEquals([], $result);
}
示例6: testDeleteAll
function testDeleteAll()
{
//Arrange
$id = null;
$brand_name = "Nike";
$test_brand = new Brand($id, $brand_name);
$test_brand->save();
$brand_name2 = "Salamon";
$test_brand2 = new Brand($id, $brand_name);
$test_brand2->save();
//Act
Brand::deleteAll();
//Assert
$result = Brand::getAll();
$this->assertEquals([], $result);
}
示例7: testDeleteAll
function testDeleteAll()
{
//Arrange
$name = "vans";
$id = 1;
$test_brand = new Brand($name, $id);
$test_brand->save();
$name2 = "crocs";
$id2 = 2;
$test_brand2 = new Brand($name2, $id2);
$test_brand2->save();
//Act
Brand::deleteAll();
$result = Brand::getAll();
//Assert
$this->assertEquals([], $result);
}
示例8: test_deleteAll
function test_deleteAll()
{
//Arrange
$name = "Nike";
$website = "http://www.nike.com";
$test_brand = new Brand($name, $website);
$test_brand->save();
$name2 = "Adidas";
$website2 = "http://www.adidas.com";
$test_brand2 = new Brand($name2, $website2);
$test_brand2->save();
//Act
Brand::deleteAll();
//Assert
$result = Brand::getAll();
$this->assertEquals([], $result);
}
示例9: test_brand_deleteAll
function test_brand_deleteAll()
{
//Arrange
$brand_name = "Nike";
$id1 = 1;
$test_brand = new Brand($brand_name, $id1);
$test_brand->save();
$brand_name2 = "Converse";
$id2 = 2;
$test_brand2 = new Brand($brand_name2, $id2);
$test_brand2->save();
//Act
Brand::deleteAll();
//Assert
$result = Brand::getAll();
$this->assertEquals([], $result);
}
示例10: test_deleteAll
function test_deleteAll()
{
//arrange
$name = "Running";
$id = 1;
$test_brand1 = new Brand($name, $id);
$test_brand1->save();
//act
$name2 = "work";
$id2 = 2;
$test_brand2 = new Brand($name2, $id2);
$test_brand2->save();
Brand::deleteAll();
$result = Brand::getAll();
//assert
$this->assertEquals([], $result);
}
示例11: tearDown
protected function tearDown()
{
Store::deleteAll();
Brand::deleteAll();
}
示例12: tearDown
protected function tearDown()
{
Store::deleteAll();
Brand::deleteAll();
$GLOBALS['DB']->exec("DELETE FROM brands_stores;");
}
示例13: testDeleteAll
function testDeleteAll()
{
$brand_name = "dr.martens";
$new_brand = new Brand($brand_name);
$new_brand->save();
$brand_name2 = "adidas";
$new_brand2 = new Brand($brand_name);
$new_brand2->save();
Brand::deleteAll();
$result = Brand::getAll();
$this->assertEquals([], $result);
}
示例14: testDeleteAll
function testDeleteAll()
{
//Arrange
$brand_name = "Nike";
$id = 1;
$test_brand = new Brand($brand_name, $id);
$brand_name2 = "Reebok";
$id2 = 2;
$test_brand2 = new Brand($brand_name2, $id2);
//Act
Brand::deleteAll();
//Assert
$result = Brand::getALl();
$this->assertEquals([], $result);
}
示例15: test_deleteAll
function test_deleteAll()
{
//Arrange
$brand_name = "BRAH-DIDAS";
$id = 1;
$test_brand = new Brand($brand_name, $id);
$test_brand->save();
$brand_name2 = "K-SWISS-CHEESE";
$id2 = 2;
$test_brand2 = new Brand($brand_name2, $id2);
$test_brand2->save();
//Act
Brand::deleteAll();
//Assert
$result = Brand::getAll();
$this->assertEquals([], $result);
}