php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74079 Stomp is unmockable in PHPUnit as of 2.0
Submitted: 2017-02-10 17:56 UTC Modified: 2021-06-06 04:22 UTC
Votes:3
Avg. Score:3.7 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:0 (0.0%)
From: dave dot k dot gupta at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: stomp (PECL)
PHP Version: 7.1.1 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dave dot k dot gupta at gmail dot com
New email:
PHP Version: OS:

 

 [2017-02-10 17:56 UTC] dave dot k dot gupta at gmail dot com
Description:
------------
It appears Stomp is unmockable with PHPUnit in PHP7. It looks like it may be an implementation problem with Stomp 2.0.

Test script:
---------------
        $this->stomp = $this->getMockBuilder('\Stomp')
            ->disableOriginalConstructor()
            ->getMock();

Actual result:
--------------
PHP Notice:  Undefined property: Mock_Stomp_b056d082::$__phpunit_invocationMocker in phar:///path/tests/build/php/tools/phpunit.phar/phpunit-mock-objects/Generator.php(263) : eval()'d code on line 361
PHP Stack trace:

PHP   1. {main}() /path/tests/build/php/tools/phpunit.phar:0

PHP   2. PHPUnit\TextUI\Command::main() /path/tests/build/php/tools/phpunit.phar:465

PHP   3. PHPUnit\TextUI\Command->run() phar:///path/tests/build/php/tools/phpunit.phar/phpunit/TextUI/Command.php:135

PHP   4. PHPUnit\TextUI\TestRunner->doRun() phar:///path/tests/build/php/tools/phpunit.phar/phpunit/TextUI/Command.php:206

PHP   5. Mock_Stomp_b056d082->__destruct() phar:///path/tests/build/php/tools/phpunit.phar/phpunit-mock-objects/Generator.php(263) : eval()'d code:0

PHP   6. Mock_Stomp_b056d082->__phpunit_getInvocationMocker() phar:///path/tests/build/php/tools/phpunit.phar/phpunit-mock-objects/Generator.php(263) : eval()'d code:47

PHP Notice:  Undefined property: Mock_Stomp_b056d082::$__phpunit_configurable in phar:///path/tests/build/php/tools/phpunit.phar/phpunit-mock-objects/Generator.php(263) : eval()'d code on line 362

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-05-28 14:20 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-05-28 14:20 UTC] cmb@php.net
Is this still an issue with latest stomp (2.0.2)?
 [2021-06-06 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 19:01:33 2024 UTC