summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Api/ExportCsvTest.php4
-rw-r--r--tests/Api/OpenSearchTest.php4
-rw-r--r--tests/BookmarkTest.php4
-rw-r--r--tests/TestBase.php2
-rw-r--r--tests/TestBaseApi.php2
5 files changed, 8 insertions, 8 deletions
diff --git a/tests/Api/ExportCsvTest.php b/tests/Api/ExportCsvTest.php
index 681f0de..a0a9eae 100644
--- a/tests/Api/ExportCsvTest.php
+++ b/tests/Api/ExportCsvTest.php
@@ -64,7 +64,7 @@ class Api_ExportCsvTest extends TestBaseApi
*/
public function testMimeTypeFilename()
{
- $res = reset($this->getAuthRequest())->send();
+ $res = rreset($this->getAuthRequest())->send();
$this->assertEquals(200, $res->getStatus());
//verify MIME content type
@@ -253,7 +253,7 @@ class Api_ExportCsvTest extends TestBaseApi
$ar[] = $arl;
}
}
- if (count(end($ar)) == 1 && reset(end($ar)) == '') {
+ if (count(end($ar)) == 1 && rreset(end($ar)) == '') {
unset($ar[key($ar)]);
}
return $ar;
diff --git a/tests/Api/OpenSearchTest.php b/tests/Api/OpenSearchTest.php
index f438b46..09166da 100644
--- a/tests/Api/OpenSearchTest.php
+++ b/tests/Api/OpenSearchTest.php
@@ -12,7 +12,7 @@ class Api_OpenSearchTest extends TestBaseApi
$xhtml = $req->send()->getBody();
$xml = simplexml_load_string($xhtml);
- $xml->registerXPathNamespace('h', reset($xml->getDocNamespaces()));
+ $xml->registerXPathNamespace('h', rreset($xml->getDocNamespaces()));
$this->assertInstanceOf(
'SimpleXMLElement', $xml,
@@ -58,7 +58,7 @@ class Api_OpenSearchTest extends TestBaseApi
{
$xml = $this->getRequest('api/opensearch.php')->send()->getBody();
$x = simplexml_load_string($xml);
- $x->registerXPathNamespace('os', reset($x->getDocNamespaces()));
+ $x->registerXPathNamespace('os', rreset($x->getDocNamespaces()));
$arElements = $x->xpath('//os:Url[@type="text/html"]');
$this->assertEquals(
diff --git a/tests/BookmarkTest.php b/tests/BookmarkTest.php
index 44a82d9..c436859 100644
--- a/tests/BookmarkTest.php
+++ b/tests/BookmarkTest.php
@@ -129,9 +129,9 @@ class BookmarkTest extends TestBase
$bs = $this->bs;
$bs->addBookmark("http://site1.com", "title", "éèüaàê", "status", array('tag1'), null, false, false, 1);
- $bookmarks =& $bs->getBookmarks(0, NULL, NULL, NULL, $terms = "eeaae"); //void
+ $bookmarks = $bs->getBookmarks(0, NULL, NULL, NULL, $terms = "eeaae"); //void
$this->assertEquals(0, $bookmarks['total']);
- $bookmarks =& $bs->getBookmarks(0, NULL, NULL, NULL, $terms = "eeuaae");
+ $bookmarks = $bs->getBookmarks(0, NULL, NULL, NULL, $terms = "eeuaae");
$this->assertEquals(1, $bookmarks['total']);
}*/
diff --git a/tests/TestBase.php b/tests/TestBase.php
index 2914749..4bffd1b 100644
--- a/tests/TestBase.php
+++ b/tests/TestBase.php
@@ -87,7 +87,7 @@ class TestBase extends PHPUnit_Framework_TestCase
protected function addUser(
$username = null, $password = null, $privateKey = null
) {
- return reset($this->addUserData($username, $password, $privateKey));
+ return rreset($this->addUserData($username, $password, $privateKey));
}
diff --git a/tests/TestBaseApi.php b/tests/TestBaseApi.php
index 1052ae7..ff3b695 100644
--- a/tests/TestBaseApi.php
+++ b/tests/TestBaseApi.php
@@ -55,7 +55,7 @@ class TestBaseApi extends TestBase
protected function setUp()
{
if ($GLOBALS['unittestUrl'] === null) {
- $this->assertTrue(false, 'Unittest URL not set in config');
+ $this->markTestSkipped('Unittest URL not set in config');
}
if ($this->urlPart === null) {
$this->assertTrue(false, 'Set the urlPart variable');