Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder The Noob Coder's Avatar
    Join Date
    Jul 2012
    Location
    The City that Never Sleeps
    Posts
    99
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Problem Creating a New Zend Project

    First off, I'd like to say I am completely new to Zend and PHPUnit and I am trying to learn them for a new project.

    After some research, many people online recommended that I start with the Akrabat tutorial for ZF located at
    http://akrabat.com/wp-content/upload...-Framework.pdf

    I followed the instructions through installation, changing my PATH variables, etc. all the way to creating my first project using the command line tool. I went to my localhost directory and ran

    Code:
    > zf create project zf-tutorial
    This aborted due to a fatal error:

    Code:
    Fatal error: Class 'PHPUnit_Framework_TestCase' not found in C:\Program Files (x86)\ZendFrameworkCli\library\Zend\Test\PHPUnit\ControllerTestCase.php on line 48
    I went to the file in question to see where the error was coming from. It reads:

    PHP Code:
    /** @see Zend_Controller_Front */
    require_once 'Zend/Controller/Front.php';

    /** @see Zend_Controller_Action_HelperBroker */
    require_once 'Zend/Controller/Action/HelperBroker.php';

    /** @see Zend_Layout */
    require_once 'Zend/Layout.php';

    /** @see Zend_Session */
    require_once 'Zend/Session.php';

    /** @see Zend_Registry */
    require_once 'Zend/Registry.php';

    /**
     * Functional testing scaffold for MVC applications
     *
     * @uses       PHPUnit_Framework_TestCase
     * @category   Zend
     * @package    Zend_Test
     * @subpackage PHPUnit
     * @copyright  Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
     * @license    http://framework.zend.com/license/new-bsd     New BSD License
     */
    abstract class Zend_Test_PHPUnit_ControllerTestCase extends PHPUnit_Framework_TestCase
    {
       . . . 
    The class Zend_Test_PHPUnit_ControllerTestCase is derived from the class PHPUnit_Framework_TestCase, which can't be found.

    I searched through the directories, but I couldn't find a file with the class PHPUnit_Framework_TestCase defined in it. I'm not sure where else it would be other than the ZendFrameworkCli\library\Zend\Test\PHPUnit\ directory. Any ideas?

    Some Miscellaneous Information:
    Code:
    > php --version
    PHP 5.5.6 (cli) (built: Nov 12 2013 11:33:44)
    Copyright (c) 1997-2013 The PHP Group
    Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
    I'm running Windows 7, using XAMPP for my server and ZF version 1.12.6 (according to the zf show version command). Could it be a problem that there are two different Zends? How do I get rid of the newer version?

  • #2
    New Coder The Noob Coder's Avatar
    Join Date
    Jul 2012
    Location
    The City that Never Sleeps
    Posts
    99
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I kept searching around and some people mentioned that I don't have PHPUnit installed, which was odd because none of the ZF tutorials I read mentioned installing it before hand or even how to install it. I got the phpunit.phar file online and dropped it into the directory where I have my PHP executable file. I was able to successfully run:

    Code:
    >phpunit -v
    PHPUnit 3.7.21 by Sebastian Bergmann.
    But I am still getting the same error when I try to create a project. Any ideas?

  • #3
    New Coder The Noob Coder's Avatar
    Join Date
    Jul 2012
    Location
    The City that Never Sleeps
    Posts
    99
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thread bump.

  • #4
    New Coder The Noob Coder's Avatar
    Join Date
    Jul 2012
    Location
    The City that Never Sleeps
    Posts
    99
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thread bump.

  • #5
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,352
    Thanks
    61
    Thanked 528 Times in 515 Posts
    I'm afraid you're not going to get an answer to this. You aadmit to using xampp - you would be better asking them to help you.

    This is really a programming forum and i doubt many people here would be familiar with how xampp has been setup.

    Sorry!
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #6
    New Coder The Noob Coder's Avatar
    Join Date
    Jul 2012
    Location
    The City that Never Sleeps
    Posts
    99
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by tangoforce View Post
    I'm afraid you're not going to get an answer to this. You aadmit to using xampp - you would be better asking them to help you.

    This is really a programming forum and i doubt many people here would be familiar with how xampp has been setup.

    Sorry!
    Well it was worth a shot. I posted a similar thread on Zend's forums, and no bites there either. I guess I have no choice but to find some other way.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •