Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Installing PHPUnit


Go to End


7 Posts   3527 Views

Avatar
MarijnKampf

Community Member, 176 Posts

26 January 2011 at 3:28am

I'm trying to install PHPUnit, so I can experiment with i18n and unit testing. However, when I try to install according to the instructions at http://doc.silverstripe.org/sapphire/en/topics/testing or http://www.phpunit.de/manual/current/en/installation.html the site components.ez.no seems to be down.

pear channel-discover components.ez.no
Discovering channel components.ez.no over http:// failed with message: channel-a
dd: Cannot open "http://components.ez.no/channel.xml" (File http://components.ez
.no:80/channel.xml not valid (redirected but no location))
Trying to discover channel components.ez.no over https:// instead
Discovery of channel "components.ez.no" failed (channel-add: Cannot open "https:
//components.ez.no/channel.xml" (Connection to `components.ez.no:443' failed: A
connection attempt failed because the connected party did not properly respond a
fter a period of time, or established connection failed because connected host h
as failed to respond.
))

Does anyone know of a mirror for this site? Or an alternative way of installing the component/module?

Avatar
Invader_Zim

Community Member, 141 Posts

26 January 2011 at 4:21am

Yapp, the whole ez-components site seems to be down. :(

Mabe it's just a temporary problem, but here is an alternative description to install phpunit:
http://www.phpunit.de/manual/3.0/en/installation.html

Good luck!

Avatar
MarijnKampf

Community Member, 176 Posts

27 January 2011 at 1:39am

Site was back up today, and installed PHPUnit. Unfortunately the http://localhost/site/dev/tasks/i18nTextCollectorTask/?module=Sitemap generated an virtually empty en_US.php file. All it contained was:

<?php

global $lang;


?>

http://bummzack.ch/langbuilder/ did generate a language file, but I am curious to why the built in SS generator didn't work.

Avatar
Willr

Forum Moderator, 5523 Posts

27 January 2011 at 4:28pm

It isn't case sensitive is it? i.e Sitemap vs sitemap?

Avatar
MarijnKampf

Community Member, 176 Posts

27 January 2011 at 8:30pm

Nope, case didn't make a difference, still a virtual empty language file.

Avatar
Willr

Forum Moderator, 5523 Posts

28 January 2011 at 9:37am

Got an example of a _t call in your sitemap module? Check they are in the format (for php - _t('ClassName.STRINGNAME', 'Value'), for templates _t('STRINGNAME', 'Value');

Avatar
MarijnKampf

Community Member, 176 Posts

29 January 2011 at 10:21am

This is what I'm using in my class (full module can be downloaded from http://svn.exadium.com/trac/browser/modules/sitemap/trunk )

	public function updateCMSFields(&$fields) {
		$fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP','Sitemap', PR_HIGH, 'Tab name'), new CheckboxField("IncludeSitemap", _t('SitemapModule.INCLUDESITEMAP',"Include a sitemap on this page")));
		$fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP'), new OptionalTreeDropdownField('BasePage', _t('SitemapModule.BASEPAGE',"Base page"), 'SiteTree', 'URLSegment', 'MenuTitle'));
		$fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP'), new NumericField("Depth", _t('SitemapModule.DEPTH',"Depth (0 = unlimited)")));
		$fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP'), new CheckboxField("ShowPageName", _t('SitemapModule.SHOWPAGENAME',"Show page name")));
		$fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP'), new CheckboxField("ShowPageMetaTitle", _t('SitemapModule.SHOWMETATITLE',"Show meta title")));
		$fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP'), new CheckboxField("ShowPageMetaDescription", _t('SitemapModule.SHOWMETADESCRIPTION',"Show meta description")));
		$fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP'), new CheckboxField("ShowPageThumbnail", _t('SitemapModule.SHOWPAGETHUMB',"Show page thumbnail")));
		$fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP'), new CheckboxField("ShowSelf", _t('SitemapModule.EXCLUDEPAGE',"Exclude this page from sitemap")));
		$fields->addFieldToTab("Root.Content." . _t('SitemapModule.SITEMAP'), new TextField("Stylesheet", _t('SitemapModule.STYLESHEET',"Stylesheet")));
	}