Jump to:

4873 Posts in 7171 Topics by 1471 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Installing PHPUnit

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

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

Page: 1
Go to End
Author Topic: 2140 Views
  • MarijnKampf
    Avatar
    Community Member
    161 Posts

    Installing PHPUnit Link to this post

    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?

  • Invader_Zim
    Avatar
    Community Member
    141 Posts

    Re: Installing PHPUnit Link to this post

    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!

  • MarijnKampf
    Avatar
    Community Member
    161 Posts

    Re: Installing PHPUnit Link to this post

    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.

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Installing PHPUnit Link to this post

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

  • MarijnKampf
    Avatar
    Community Member
    161 Posts

    Re: Installing PHPUnit Link to this post

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

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Installing PHPUnit Link to this post

    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');

  • MarijnKampf
    Avatar
    Community Member
    161 Posts

    Re: Installing PHPUnit Link to this post

    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")));
       }

    2140 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.