Menu

#145 Working tutorial

open
nobody
5
2008-12-21
2008-06-11
Anonymous
No

I'm trying to follow the tutorial to get into unit testing. Unfortunately almost nothing works. I'm on windows, maybe that's the reason. I need to figure out what's wrong with every code example. Frustrating.

Discussion

  • Mark Rickerby

    Mark Rickerby - 2008-06-11

    Logged In: YES
    user_id=993532
    Originator: NO

    Thanks for your feedback...

    Is there anything specific that would make things easier / feel less broken on Windows?

     
  • Nobody/Anonymous

    Logged In: NO

    DIRECTORY_SEPARATOR and full system paths (define a BASE dir for the testing dirs (BASE . DS . 'classes' etc). I know it's not a PHP intro tutorial but having to change examples to make them work distracts.
    Another example is the newline (\r vs \n\r).

     
  • Edward Z. Yang

    Edward Z. Yang - 2008-06-12

    Logged In: YES
    user_id=1195258
    Originator: NO

    Hello,

    PHP transparently converts Unix style paths to Windows; examples should work regardless. Also, defining a base directory really shouldn't be necessary unless you're running the examples via command line from a different directory, or your include path doesn't have "." as part of it (both advanced uses, and generally not tutorialish). As for \n vs \r\n, any text editor worth its salt will display Unix style endlines fine. For a logging application, Unix-style newlines make the most sense, I think.

     
  • Nobody/Anonymous

    Logged In: NO

    It should ...
    The only thing I have done is copied pasted the examples in eclipse using firefox for output. My php.ini file is pretty generic. Still things didn't work until I changed what I mentioned. I'll put this on my @NA list and test it again and report back.

     
  • Nobody/Anonymous

    Logged In: NO

    It works. I missed something in the folder setup. Sorry.

    One thing though. If I click on the menu item "grouping tests" in the tutorial menu on the website, some menu items appear multiple times. Same for "reusing cases".

     
  • Nobody/Anonymous

    Logged In: NO

    The PHP-Code is broken as it contains the HTML-Entities for < and >... Maybe someone fix this

     
  • Edward Z. Yang

    Edward Z. Yang - 2008-12-21

    Refiling as bugs. Can you post a link to the page that has broken PHP code?

     
  • Edward Z. Yang

    Edward Z. Yang - 2008-12-21
    • labels: 1053343 --> Documentation
     

Log in to post a comment.