aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2011-04-06 07:46:55 +0200
committerChristian Weiske <cweiske@cweiske.de>2011-04-06 07:46:55 +0200
commit988e564ec3af4191cc9a7a8a04ae1cb582271518 (patch)
tree14b32a9a5f67a68d22de889e6a719dddf10db235 /tests
parent1aa20d38ca2833287ae3cd46b78dc000aea93732 (diff)
downloadsemanticscuttle-988e564ec3af4191cc9a7a8a04ae1cb582271518.tar.gz
semanticscuttle-988e564ec3af4191cc9a7a8a04ae1cb582271518.tar.bz2
always delete all bookmarks in setUp since almost all methods do it anyway
Diffstat (limited to 'tests')
-rw-r--r--tests/Api/PostsAddTest.php21
1 files changed, 7 insertions, 14 deletions
diff --git a/tests/Api/PostsAddTest.php b/tests/Api/PostsAddTest.php
index 1f21d04..226a7c9 100644
--- a/tests/Api/PostsAddTest.php
+++ b/tests/Api/PostsAddTest.php
@@ -51,6 +51,13 @@ class Api_PostsAddTest extends TestBaseApi
}
+ public function setUp()
+ {
+ parent::setUp();
+ $this->bs->deleteAll();
+ }
+
+
/**
* Test if authentication is required when sending no auth data
@@ -82,8 +89,6 @@ class Api_PostsAddTest extends TestBaseApi
*/
public function testAddBookmarkPost()
{
- $this->bs->deleteAll();
-
$bmUrl = 'http://example.org/tag-1';
$bmTags = array('foo', 'bar', 'baz');
$bmDatetime = '2010-09-08T03:02:01Z';
@@ -144,8 +149,6 @@ TXT;
*/
public function testAddBookmarkGet()
{
- $this->bs->deleteAll();
-
$bmUrl = 'http://example.org/tag-1';
$bmTags = array('foo', 'bar', 'baz');
$bmDatetime = '2010-09-08T03:02:01Z';
@@ -205,8 +208,6 @@ TXT;
*/
public function testUrlDescEnough()
{
- $this->bs->deleteAll();
-
list($req, $uId) = $this->getAuthRequest();
$req->setMethod(HTTP_Request2::METHOD_POST);
$req->addPostParameter('url', 'http://example.org/tag2');
@@ -241,8 +242,6 @@ TXT;
*/
public function testUrlRequired()
{
- $this->bs->deleteAll();
-
list($req, $uId) = $this->getAuthRequest();
$req->setMethod(HTTP_Request2::METHOD_POST);
//$req->addPostParameter('url', 'http://example.org/tag2');
@@ -277,8 +276,6 @@ TXT;
*/
public function testDescriptionRequired()
{
- $this->bs->deleteAll();
-
list($req, $uId) = $this->getAuthRequest();
$req->setMethod(HTTP_Request2::METHOD_POST);
$req->addPostParameter('url', 'http://example.org/tag2');
@@ -313,8 +310,6 @@ TXT;
*/
public function testReplaceNo()
{
- $this->bs->deleteAll();
-
$url = 'http://example.org/tag2';
$title1 = 'foo bar 1';
$title2 = 'bar 2 foo';
@@ -381,8 +376,6 @@ TXT;
*/
public function testReplaceYes()
{
- $this->bs->deleteAll();
-
$url = 'http://example.org/tag2';
$title1 = 'foo bar 1';
$title2 = 'bar 2 foo';