#5 new
Predominant

Add test convenience function

Reported by Predominant | December 9th, 2009 @ 04:56 PM

(Reported by: Predominant)

function test() {
   echo "test";
}

Add more convenience functions.

Comments and changes to this ticket

  • Predominant

    Predominant December 9th, 2009 @ 10:15 PM

    What happened

    I have a plugin with a vendors folder, and from within the plugin I want to import a file from this vendors folder, though the file is not imported because I get a "class not found" when I try to instantiate the respective class.

    • thing
    • thing 2
      • Subthing

    New stuff.
    Another line.

    What was expected

    That the specified file is imported.

    Here a test case:

    Index: cake/tests/cases/libs/configure.test.php
    ===================================================================
    --- cake/tests/cases/libs/configure.test.php    (revision 8285)
    +++ cake/tests/cases/libs/configure.test.php    (working copy)
    @@ -535,6 +535,12 @@
            $text = ob_get_clean();
            $this->assertTrue($result);
            $this->assertEqual($text, 'This is the welcome.php file in test_plugin/vendors directory');
    +       
    +       ob_start();
    +       $result = App::import('Vendor', 'AnotherWelcome', array('file' => 'Welcome'.DS.'welcome.php'));
    +       $text = ob_get_clean();
    +       $this->assertTrue($result);
    +       $this->assertEqual($text, 'This is the welcome.php file in test_plugin/vendors/Welcome directory');
        }
     }
     ?>
    \ No newline at end of file
    Index: cake/tests/test_app/plugins/test_plugin/vendors/Welcome/welcome.php
    ===================================================================
    --- cake/tests/test_app/plugins/test_plugin/vendors/Welcome/welcome.php (revision 0)
    +++ cake/tests/test_app/plugins/test_plugin/vendors/Welcome/welcome.php (revision 0)
    @@ -0,0 +1,28 @@
    +<?php
    +/* SVN FILE: $Id: welcome.php 8116 2009-03-18 17:55:58Z davidpersson $ */
    +/**
    + * Short description for file.
    + *
    + * Long description for file
    + *
    + * PHP versions 4 and 5
    + *
    + * CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
    + * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
    + *
    + *  Licensed under The Open Group Test Suite License
    + *  Redistributions of files must retain the above copyright notice.
    + *
    + * @filesource
    + * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
    + * @link          https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
    + * @package       cake
    + * @subpackage    cake.tests.test_app.plugins.test_plugin.vendors
    + * @since         CakePHP(tm) v 1.2.0.7629
    + * @version       $Revision: 8116 $
    + * @modifiedby    $LastChangedBy: davidpersson $
    + * @lastmodified  $Date: 2009-03-18 18:55:58 +0100 (Wed, 18 Mar 2009) $
    + * @license       http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
    + */
    +?>
    +This is the welcome.php file in test_plugin/vendors/Welcome directory
    \ No newline at end of file
    

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Blah

Shared Ticket Bins

People watching this ticket

Pages