The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    PHPUnit install not working. HELP!

    Discussion in 'Windows OS and Software' started by smalss, May 14, 2007.

  1. smalss

    smalss Notebook Consultant

    Reputations:
    0
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    30
    My phpunit install doesn't seem to be working. Its missing lots of files in the php/pear/phpunit folder so when i test a class it says missing this, missing that. I used the install tutorial online at phpunit.de website or something. Is my version of PHP not the right one or something?? Any help would be greatly appreciated! thnx
     
  2. Budding

    Budding Notebook Virtuoso

    Reputations:
    1,686
    Messages:
    3,982
    Likes Received:
    0
    Trophy Points:
    105
    What exactly does it say is missing? Are you certain you have your php.ini pointing to the correct directory?
     
  3. smalss

    smalss Notebook Consultant

    Reputations:
    0
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    30
    This is the error:

    Warning: require_once(PHPUnit/Framework.php) [function.require-once]: failed to open stream: No such file or directory in C:\www\FirstNameTest.php on line 5

    Fatal error: require_once() [function.require]: Failed opening required 'PHPUnit/Framework.php' (include_path='.;C:\php\pear;c:\php\includes;../src/') in C:\www\FirstNameTest.php on line 5

    but i got a friend to send me his PHPUnit folder and it then gives me a new error.
     
  4. Budding

    Budding Notebook Virtuoso

    Reputations:
    1,686
    Messages:
    3,982
    Likes Received:
    0
    Trophy Points:
    105
    Try right clicking on your C:/PHP folder and making sure the READ-ONLY checkbox is unchecked. Also make sure your PHPUnit folder is spelt exactly like that (case sensitive).
    And what is the new error you get?
     
  5. smalss

    smalss Notebook Consultant

    Reputations:
    0
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    30
    This now gives me no errors when testing in the browser. Although even when i should get an error i get nothing. so something is still messed.

    How do you test in the command prompt?? i think i know how but i get this error:
    c:\php\phpunit FirstNameTest.php is not recognized as an internal or external command, operable program or batch file.
     
  6. Budding

    Budding Notebook Virtuoso

    Reputations:
    1,686
    Messages:
    3,982
    Likes Received:
    0
    Trophy Points:
    105
    You cannot test a PHP file in the command prompt. You can only test it in the browser. You could try a different browser, although I doubt that would make a difference. Are you sure you absolutely certain you are supposed to have an error? Perhaps you missed out a bit of code that echoes the error message in your PHP?