4572 Posts in 1382 Topics by 1377 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1716 Views |
-
Installing PHPUnit

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?
-
Re: Installing PHPUnit

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.htmlGood luck!
-
Re: Installing PHPUnit

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.
-
Re: Installing PHPUnit

27 January 2011 at 4:28pm
It isn't case sensitive is it? i.e Sitemap vs sitemap?
-
Re: Installing PHPUnit

27 January 2011 at 8:30pm
Nope, case didn't make a difference, still a virtual empty language file.
-
Re: Installing PHPUnit

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');
-
Re: Installing PHPUnit

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")));
}
| 1716 Views | ||
|
Page:
1
|
Go to Top |



