Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI_URI::__construct() add constructor args #140

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hiyao
Copy link

@hiyao hiyao commented Oct 5, 2016

See #116

@coveralls
Copy link

Coverage Status

Coverage remained the same at 72.956% when pulling 53c750b on hiyao:master into 3255d61 on kenjis:master.

@hiyao hiyao changed the title Fix CI_URI::__construct() Fix CI_URI::__construct() add constructor args Oct 5, 2016
@kenjis
Copy link
Owner

kenjis commented Oct 6, 2016

@hiyao
Copy link
Author

hiyao commented Oct 6, 2016

I used the latest develop version of Codeigniter to run phpunit, then I found this issue.

An uncaught Exception was encountered

Type:        TypeError
Message:     Argument 1 passed to CI_URI::__construct() must be an instance of CI_Config, none given, called in /Users/hiyao/Documents/projects/ci/application/tests/_ci_phpunit_test/replacing/core/Common.php on line 111
Filename:    /Users/hiyao/Documents/projects/ci/system/core/URI.php
Line Number: 99

Backtrace:
    File: /Users/hiyao/Documents/projects/ci/application/tests/_ci_phpunit_test/replacing/core/Common.php
    Line: 111
    Function: __construct

    File: /Users/hiyao/Documents/projects/ci/application/tests/_ci_phpunit_test/replacing/core/CodeIgniter.php
    Line: 305
    Function: load_class

    File: /Users/hiyao/Documents/projects/ci/application/tests/_ci_phpunit_test/CIPHPUnitTest.php
    Line: 76
    Function: require

    File: /Users/hiyao/Documents/projects/ci/application/tests/Bootstrap.php
    Line: 361
    Function: init

    File: phar:///Users/hiyao/dev_tools/phpunit-5.4/phpunit-5.4.2.phar/phpunit/Util/Fileloader.php
    Line: 56
    Function: include_once

    File: phar:///Users/hiyao/dev_tools/phpunit-5.4/phpunit-5.4.2.phar/phpunit/Util/Fileloader.php
    Line: 38
    Function: load

    File: phar:///Users/hiyao/dev_tools/phpunit-5.4/phpunit-5.4.2.phar/phpunit/TextUI/Command.php
    Line: 875
    Function: checkAndLoad

    File: phar:///Users/hiyao/dev_tools/phpunit-5.4/phpunit-5.4.2.phar/phpunit/TextUI/Command.php
    Line: 704
    Function: handleBootstrap

    File: phar:///Users/hiyao/dev_tools/phpunit-5.4/phpunit-5.4.2.phar/phpunit/TextUI/Command.php
    Line: 124
    Function: handleArguments

    File: phar:///Users/hiyao/dev_tools/phpunit-5.4/phpunit-5.4.2.phar/phpunit/TextUI/Command.php
    Line: 113
    Function: run

    File: /Users/hiyao/dev_tools/phpunit-5.4/phpunit-5.4.2.phar
    Line: 528
    Function: main

So I try to fix this. :p

See https://github.com/bcit-ci/CodeIgniter/blob/develop/system/core/CodeIgniter.php#L301

@kenjis
Copy link
Owner

kenjis commented Oct 12, 2016

Thank you for your information.
But I can't merge this PR until the developing CI is officially released.

See https://github.com/kenjis/ci-phpunit-test/tree/master/application/tests/_ci_phpunit_test/replacing/core. The current CodeIgniter.php is of the current official version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants