Re: [Semanticscuttle-devel] getBookmarks() tag problems / user session problems
Brought to you by:
cweiske
|
From: Christian W. <cw...@cw...> - 2011-06-08 05:48:01
|
Hello Mark,
> > I didn't do anything on SemanticScuttle the last week, but didn't
> > forget you. I began reading Winnetou I and am at the end of Winnetou
> > II :)
> Interesting. I've never heard of the book, but it's obviously a very
> popular series (selling over 200 million copies). I may head down to
> our local used book store to see if they have it. And not that it
> means much, but I'm like a fraction of Cherokee Indian. For that
> matter, I also have some German heritage too... :)
Karl May, the German, is very popular here. The Winnetou indian novels
are entertaining to read - even though Karl May never has been in the
USA - and I lately asked myself why I didn't read the books when I was
a child. Since it's never too late to catch up on books, I got them
from Project Gutenberg as epub files for my nook ebook reader and am
entertained by them, even if Karl May really exaggerates here and
there :)
> > One test fails for me; it's
> > 1) www_bookmarksTest::testVerifyPrivateRSSLinkExists
> > Number of Links in Head not correct
I solved the problem: You missed a the unittestmode URL parameter.
Since I configured my SemanticScuttle to use a different database for
unit tests, the SemanticScuttle in non-unittestmode behaves differently
than in unit test mode because the data set is differently.
Now I just see that this feature is not really documented :/
Create a file
> data/config.testing.php
and put a different database in it:
> $dbname = 'semanticscuttle_tests';
> I've updated the xpath and did some additional checking. Forgive my
> inexperience with xpath. Still on a learning curve with it. I'm
> loving it though! I've also added a file for index.php.
Great.
> > I'm also not fully happy with the duplicated code in rss.php (the
> > privatekey login and check if that didn't work), but could live
> > with it for now.
> I've looked this code over quite a bit and I could pull a couple lines
> of code out to remove some of the duplication, but I think that whole
> if/else section may need to be completely reworked and I don't feel
> comfortable (yet) to do that. Let's get this revision out and then we
> can rework it.
Yep.
> > Btw, how did you fix the time-problematic unit tests now? Do they
> > run for you now?
> After reverting back to gmdate(), I think there are only two changes
> that was necessary. And yes, they run perfectly for me. Please
> verify that I've done the right thing.
> 1) In tests/Bookmark2TagTest.php, in testGetPopularTagsDays(), the use
> of "today" doesn't return time (defaults to 00:00:00 AM) so I changed
> it to now which does.
> 2) In Service/Bookmark2Tag.php in getPopularTags(), there was a date()
> call that was never migrated over to use gmdate().
Great. 2 more bugs fixed :)
> > In www/index.php
> >> filter($sitename . sprintf(T_(': Recent bookmarks (private)')) .
> >> $currentUsername),
> > make the full string translatable, including the user name:
> >> T_(': Recent bookmarks (private) %s')
> > (there was a space missing after the ) btw)
> > and give the user name to sprintf as parameter - the sprintf was
> > totally useless since there were no placeholders in the string.
> Updated. Please review to make sure it is ok.
Looks good.
--
Regards/Mit freundlichen Grüßen
Christian Weiske
-=≡ Geeking around in the name of science since 1982 ≡=-
|