diff options
author | Christian Weiske <cweiske@cweiske.de> | 2011-04-06 07:46:55 +0200 |
---|---|---|
committer | Christian Weiske <cweiske@cweiske.de> | 2011-04-06 07:46:55 +0200 |
commit | 988e564ec3af4191cc9a7a8a04ae1cb582271518 (patch) | |
tree | 14b32a9a5f67a68d22de889e6a719dddf10db235 /tests/Api | |
parent | 1aa20d38ca2833287ae3cd46b78dc000aea93732 (diff) | |
download | semanticscuttle-988e564ec3af4191cc9a7a8a04ae1cb582271518.tar.gz semanticscuttle-988e564ec3af4191cc9a7a8a04ae1cb582271518.tar.bz2 |
always delete all bookmarks in setUp since almost all methods do it anyway
Diffstat (limited to 'tests/Api')
-rw-r--r-- | tests/Api/PostsAddTest.php | 21 |
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'; |