diff options
author | Mark Pemberton <mpemberton5@gmail.com> | 2011-05-21 14:36:29 -0400 |
---|---|---|
committer | Mark Pemberton <mpemberton5@gmail.com> | 2011-05-21 14:36:29 -0400 |
commit | e0149e24e2b5fac3b875fda468b18fbe2b6b1218 (patch) | |
tree | 01547d72aff07859c53b406f6c68775e4d1c5c74 | |
parent | 5203848b12ccda0009409e08165bfa2d9d34a837 (diff) | |
download | semanticscuttle-e0149e24e2b5fac3b875fda468b18fbe2b6b1218.tar.gz semanticscuttle-e0149e24e2b5fac3b875fda468b18fbe2b6b1218.tar.bz2 |
Resolve some failed bookmark and tag tests
-rw-r--r-- | data/templates/bookmarks.tpl.php | 4 | ||||
-rw-r--r-- | tests/AllTests.php | 3 | ||||
-rw-r--r-- | tests/Api/PostsAddTest.php | 4 | ||||
-rw-r--r-- | tests/Bookmark2TagTest.php | 6 | ||||
-rw-r--r-- | www/index.php | 2 |
5 files changed, 10 insertions, 9 deletions
diff --git a/data/templates/bookmarks.tpl.php b/data/templates/bookmarks.tpl.php index 55d6a0f..42aaa95 100644 --- a/data/templates/bookmarks.tpl.php +++ b/data/templates/bookmarks.tpl.php @@ -220,8 +220,8 @@ if ($currenttag!= '') { $size = count($rsschannels); for ($i = 0; $i < $size; $i++) { $brss = '<a style="background:#FFFFFF" href="'. htmlspecialchars($rsschannels[$i][1]) . '"' - . ' title="' . htmlspecialchars($rsschannels[$i][0]) . '">' - . '<img src="' . ROOT . 'images/rss.gif" width="16" height="16" alt="' . htmlspecialchars($rsschannels[$i][0]) .'"/>' + . ' title="' . $rsschannels[$i][0] . '">' + . '<img src="' . ROOT . 'images/rss.gif" width="16" height="16" alt="' . $rsschannels[$i][0] .'"/>' . '</a>'; } diff --git a/tests/AllTests.php b/tests/AllTests.php index 9e825e8..92f8960 100644 --- a/tests/AllTests.php +++ b/tests/AllTests.php @@ -46,6 +46,7 @@ class AllTests extends PHPUnit_Framework_TestSuite $suite->addTestFile($tdir . '/VoteTest.php'); $suite->addTestFile($tdir . '/UserTest.php'); $suite->addTestFile($tdir . '/Api/ExportCsvTest.php'); + $suite->addTestFile($tdir . '/Api/OpenSearchTest.php'); $suite->addTestFile($tdir . '/Api/PostsAddTest.php'); $suite->addTestFile($tdir . '/Api/PostsDeleteTest.php'); $suite->addTestFile($tdir . '/Api/PostsUpdateTest.php'); @@ -58,4 +59,4 @@ class AllTests extends PHPUnit_Framework_TestSuite { } } -?>
\ No newline at end of file +?> diff --git a/tests/Api/PostsAddTest.php b/tests/Api/PostsAddTest.php index 02e2b38..e6d0531 100644 --- a/tests/Api/PostsAddTest.php +++ b/tests/Api/PostsAddTest.php @@ -108,7 +108,7 @@ TXT; $this->assertEquals($bmUrl, $bm['bAddress']); $this->assertEquals($bmTitle, $bm['bTitle']); - $this->assertEquals($bmDescription, $bm['bDescription']); + $this->assertEquals($bmDescription, stripslashes($bm['bDescription'])); $this->assertEquals($bmTags, $bm['tags']); $this->assertEquals( gmdate('Y-m-d H:i:s', strtotime($bmDatetime)), @@ -170,7 +170,7 @@ TXT; $this->assertEquals($bmUrl, $bm['bAddress']); $this->assertEquals($bmTitle, $bm['bTitle']); - $this->assertEquals($bmDescription, $bm['bDescription']); + $this->assertEquals($bmDescription, stripslashes($bm['bDescription'])); $this->assertEquals($bmTags, $bm['tags']); $this->assertEquals( gmdate('Y-m-d H:i:s', strtotime($bmDatetime)), diff --git a/tests/Bookmark2TagTest.php b/tests/Bookmark2TagTest.php index 789540f..66a6e1f 100644 --- a/tests/Bookmark2TagTest.php +++ b/tests/Bookmark2TagTest.php @@ -290,8 +290,8 @@ class Bookmark2TagTest extends TestBase $arTags = $this->b2ts->getPopularTags(null, 10, null, 1); $this->assertInternalType('array', $arTags); $this->assertEquals(3, count($arTags)); - $this->assertContains(array('tag' => 'one', 'bCount' => '2'), $arTags); - $this->assertContains(array('tag' => 'two', 'bCount' => '1'), $arTags); + $this->assertContains(array('tag' => 'one', 'bCount' => '3'), $arTags); + $this->assertContains(array('tag' => 'two', 'bCount' => '2'), $arTags); $this->assertContains(array('tag' => 'thr', 'bCount' => '1'), $arTags); $arTags = $this->b2ts->getPopularTags(null, 10, null, 2); @@ -608,4 +608,4 @@ class Bookmark2TagTest extends TestBase $this->assertContains(array('tag' => 'usable', 'bCount' => '2'), $arTags); } } -?>
\ No newline at end of file +?> diff --git a/www/index.php b/www/index.php index 0977923..931d64d 100644 --- a/www/index.php +++ b/www/index.php @@ -42,7 +42,7 @@ if (GET_ACTION == "logout") { // Header variables $tplVars['loadjs'] = true; $tplVars['rsschannels'] = array( -array(sprintf(T_('%s: Recent bookmarks'), $sitename), createURL('rss').'?sort='.getSortOrder()) +array(sprintf(T_('%s: Recent bookmarks'), htmlspecialchars($sitename)), createURL('rss').'?sort='.getSortOrder()) ); if ($userservice->isLoggedOn()) { |