Fixes mocking for PHPUnit 5.4 using Codeception\Util\Stub #3093

Merged
merged 2 commits into from May 16, 2016

Conversation

Projects
None yet
1 participant
@DavertMik
Member

DavertMik commented May 11, 2016

No description provided.

@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik May 11, 2016

Member

Replacement for #3080

Member

DavertMik commented May 11, 2016

Replacement for #3080

@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik May 11, 2016

Member

Locally tested with PHPUnit 5.4:

phpunit/php-code-coverage          dev-master 679ebb7 Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator          1.4.1              FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template          1.2.1              Simple template engine.
phpunit/php-timer                  1.0.7              Utility class for timing
phpunit/php-token-stream           1.4.8              Wrapper around PHP's tokenizer extension.
phpunit/phpunit                    dev-master a07dd59 The PHP Unit Testing framework.
phpunit/phpunit-mock-objects       dev-master 5d8c2a8 Mock Object library for PHPUnit

Tests output:

Unit Tests (75) ---------------------------------------------------------------------------------------------------------------------------------------------------
Modules: CodeHelper, EmulateModuleHelper
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
StubTest::testCopy                                                                                                                                           Ok
StubTest::testConstructMethodSimplyReplaced                                                                                                                  Ok
StubTest::testMake                                                                                                                                           Ok
StubTest::testMockedMethodIsCalledFail | #0                                                                                                                  Ok
StubTest::testMockedMethodIsCalledFail | #1                                                                                                                  Ok
StubTest::testMockedMethodIsCalledFail | #2                                                                                                                  Ok
StubTest::testMockedMethodIsCalledFail | #3                                                                                                                  Ok
StubTest::testMockedMethodIsCalledFail | #4                                                                                                                  Ok
StubTest::testMethodMatcherWithConstructEmpty | #0                                                                                                           Ok
StubTest::testMethodMatcherWithConstructEmpty | #1                                                                                                           Ok
StubTest::testMethodMatcherWithConstructEmpty | #2                                                                                                           Ok
StubTest::testMethodMatcherWithConstructEmpty | #3                                                                                                           Ok
StubTest::testMethodMatcherWithConstructEmpty | #4                                                                                                           Ok
StubTest::testMethodMatcherWithConstructEmpty | #5                                                                                                           Ok
StubTest::testMethodMatcherWithConstructEmpty | #6                                                                                                           Ok
StubTest::testMethodMatcherWithConstructEmpty | #7                                                                                                           Ok
StubTest::testMethodMatcherWithMake | #0                                                                                                                     Ok
StubTest::testMethodMatcherWithMake | #1                                                                                                                     Ok
StubTest::testMethodMatcherWithMake | #2                                                                                                                     Ok
StubTest::testMethodMatcherWithMake | #3                                                                                                                     Ok
StubTest::testMethodMatcherWithMake | #4                                                                                                                     Ok
StubTest::testMethodMatcherWithMake | #5                                                                                                                     Ok
StubTest::testMethodMatcherWithMake | #6                                                                                                                     Ok
StubTest::testMethodMatcherWithMake | #7                                                                                                                     Ok
StubTest::testMakeMethodReplaced                                                                                                                             Ok
StubTest::testConstructEmptyExcept                                                                                                                           Ok
StubTest::testConsecutive                                                                                                                                    Ok
StubTest::testMakeEmptyExcept                                                                                                                                Ok
StubTest::testMakeEmptyExceptMagicalPropertyReplaced                                                                                                         Ok
StubTest::testMethodMatcherWithMakeEmptyExcept | #0                                                                                                          Ok
StubTest::testMethodMatcherWithMakeEmptyExcept | #1                                                                                                          Ok
StubTest::testMethodMatcherWithMakeEmptyExcept | #2                                                                                                          Ok
StubTest::testMethodMatcherWithMakeEmptyExcept | #3                                                                                                          Ok
StubTest::testMethodMatcherWithMakeEmptyExcept | #4                                                                                                          Ok
StubTest::testMethodMatcherWithMakeEmptyExcept | #5                                                                                                          Ok
StubTest::testMethodMatcherWithMakeEmptyExcept | #6                                                                                                          Ok
StubTest::testMethodMatcherWithMakeEmptyExcept | #7                                                                                                          Ok
StubTest::testMakeMethodSimplyReplaced                                                                                                                       Ok
StubTest::testMethodMatcherWithMakeEmpty | #0                                                                                                                Ok
StubTest::testMethodMatcherWithMakeEmpty | #1                                                                                                                Ok
StubTest::testMethodMatcherWithMakeEmpty | #2                                                                                                                Ok
StubTest::testMethodMatcherWithMakeEmpty | #3                                                                                                                Ok
StubTest::testMethodMatcherWithMakeEmpty | #4                                                                                                                Ok
StubTest::testMethodMatcherWithMakeEmpty | #5                                                                                                                Ok
StubTest::testMethodMatcherWithMakeEmpty | #6                                                                                                                Ok
StubTest::testMethodMatcherWithMakeEmpty | #7                                                                                                                Ok
StubTest::testStubPrivateProperties                                                                                                                          Ok
StubTest::testMethodMatcherWithConstruct | #0                                                                                                                Ok
StubTest::testMethodMatcherWithConstruct | #1                                                                                                                Ok
StubTest::testMethodMatcherWithConstruct | #2                                                                                                                Ok
StubTest::testMethodMatcherWithConstruct | #3                                                                                                                Ok
StubTest::testMethodMatcherWithConstruct | #4                                                                                                                Ok
StubTest::testMethodMatcherWithConstruct | #5                                                                                                                Ok
StubTest::testMethodMatcherWithConstruct | #6                                                                                                                Ok
StubTest::testMethodMatcherWithConstruct | #7                                                                                                                Ok
StubTest::testConstruct                                                                                                                                      Ok
StubTest::testMakeEmptyMethodReplaced                                                                                                                        Ok
StubTest::testMakeEmpty                                                                                                                                      Ok
StubTest::testMethodMatcherWithConstructEmptyExcept | #0                                                                                                     Ok
StubTest::testMethodMatcherWithConstructEmptyExcept | #1                                                                                                     Ok
StubTest::testMethodMatcherWithConstructEmptyExcept | #2                                                                                                     Ok
StubTest::testMethodMatcherWithConstructEmptyExcept | #3                                                                                                     Ok
StubTest::testMethodMatcherWithConstructEmptyExcept | #4                                                                                                     Ok
StubTest::testMethodMatcherWithConstructEmptyExcept | #5                                                                                                     Ok
StubTest::testMethodMatcherWithConstructEmptyExcept | #6                                                                                                     Ok
StubTest::testMethodMatcherWithConstructEmptyExcept | #7                                                                                                     Ok
StubTest::testMakeWithMagicalPropertiesReplaced                                                                                                              Ok
StubTest::testFactory                                                                                                                                        Ok
StubTest::testStubMakeEmptyInterface                                                                                                                         Ok
StubTest::testConstructMethodReplaced                                                                                                                        Ok
StubTest::testUpdate                                                                                                                                         Ok
StubTest::testMakeEmptyExceptPropertyReplaced                                                                                                                Ok
StubTest::testMakeEmptyMethodSimplyReplaced                                                                                                                  Ok
StubTest::testStubsFromObject                                                                                                                                Ok
StubTest::testConstructEmpty                                                                                                                                 Ok
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

Member

DavertMik commented May 11, 2016

Locally tested with PHPUnit 5.4:

phpunit/php-code-coverage          dev-master 679ebb7 Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator          1.4.1              FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template          1.2.1              Simple template engine.
phpunit/php-timer                  1.0.7              Utility class for timing
phpunit/php-token-stream           1.4.8              Wrapper around PHP's tokenizer extension.
phpunit/phpunit                    dev-master a07dd59 The PHP Unit Testing framework.
phpunit/phpunit-mock-objects       dev-master 5d8c2a8 Mock Object library for PHPUnit

Tests output:

Unit Tests (75) ---------------------------------------------------------------------------------------------------------------------------------------------------
Modules: CodeHelper, EmulateModuleHelper
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
StubTest::testCopy                                                                                                                                           Ok
StubTest::testConstructMethodSimplyReplaced                                                                                                                  Ok
StubTest::testMake                                                                                                                                           Ok
StubTest::testMockedMethodIsCalledFail | #0                                                                                                                  Ok
StubTest::testMockedMethodIsCalledFail | #1                                                                                                                  Ok
StubTest::testMockedMethodIsCalledFail | #2                                                                                                                  Ok
StubTest::testMockedMethodIsCalledFail | #3                                                                                                                  Ok
StubTest::testMockedMethodIsCalledFail | #4                                                                                                                  Ok
StubTest::testMethodMatcherWithConstructEmpty | #0                                                                                                           Ok
StubTest::testMethodMatcherWithConstructEmpty | #1                                                                                                           Ok
StubTest::testMethodMatcherWithConstructEmpty | #2                                                                                                           Ok
StubTest::testMethodMatcherWithConstructEmpty | #3                                                                                                           Ok
StubTest::testMethodMatcherWithConstructEmpty | #4                                                                                                           Ok
StubTest::testMethodMatcherWithConstructEmpty | #5                                                                                                           Ok
StubTest::testMethodMatcherWithConstructEmpty | #6                                                                                                           Ok
StubTest::testMethodMatcherWithConstructEmpty | #7                                                                                                           Ok
StubTest::testMethodMatcherWithMake | #0                                                                                                                     Ok
StubTest::testMethodMatcherWithMake | #1                                                                                                                     Ok
StubTest::testMethodMatcherWithMake | #2                                                                                                                     Ok
StubTest::testMethodMatcherWithMake | #3                                                                                                                     Ok
StubTest::testMethodMatcherWithMake | #4                                                                                                                     Ok
StubTest::testMethodMatcherWithMake | #5                                                                                                                     Ok
StubTest::testMethodMatcherWithMake | #6                                                                                                                     Ok
StubTest::testMethodMatcherWithMake | #7                                                                                                                     Ok
StubTest::testMakeMethodReplaced                                                                                                                             Ok
StubTest::testConstructEmptyExcept                                                                                                                           Ok
StubTest::testConsecutive                                                                                                                                    Ok
StubTest::testMakeEmptyExcept                                                                                                                                Ok
StubTest::testMakeEmptyExceptMagicalPropertyReplaced                                                                                                         Ok
StubTest::testMethodMatcherWithMakeEmptyExcept | #0                                                                                                          Ok
StubTest::testMethodMatcherWithMakeEmptyExcept | #1                                                                                                          Ok
StubTest::testMethodMatcherWithMakeEmptyExcept | #2                                                                                                          Ok
StubTest::testMethodMatcherWithMakeEmptyExcept | #3                                                                                                          Ok
StubTest::testMethodMatcherWithMakeEmptyExcept | #4                                                                                                          Ok
StubTest::testMethodMatcherWithMakeEmptyExcept | #5                                                                                                          Ok
StubTest::testMethodMatcherWithMakeEmptyExcept | #6                                                                                                          Ok
StubTest::testMethodMatcherWithMakeEmptyExcept | #7                                                                                                          Ok
StubTest::testMakeMethodSimplyReplaced                                                                                                                       Ok
StubTest::testMethodMatcherWithMakeEmpty | #0                                                                                                                Ok
StubTest::testMethodMatcherWithMakeEmpty | #1                                                                                                                Ok
StubTest::testMethodMatcherWithMakeEmpty | #2                                                                                                                Ok
StubTest::testMethodMatcherWithMakeEmpty | #3                                                                                                                Ok
StubTest::testMethodMatcherWithMakeEmpty | #4                                                                                                                Ok
StubTest::testMethodMatcherWithMakeEmpty | #5                                                                                                                Ok
StubTest::testMethodMatcherWithMakeEmpty | #6                                                                                                                Ok
StubTest::testMethodMatcherWithMakeEmpty | #7                                                                                                                Ok
StubTest::testStubPrivateProperties                                                                                                                          Ok
StubTest::testMethodMatcherWithConstruct | #0                                                                                                                Ok
StubTest::testMethodMatcherWithConstruct | #1                                                                                                                Ok
StubTest::testMethodMatcherWithConstruct | #2                                                                                                                Ok
StubTest::testMethodMatcherWithConstruct | #3                                                                                                                Ok
StubTest::testMethodMatcherWithConstruct | #4                                                                                                                Ok
StubTest::testMethodMatcherWithConstruct | #5                                                                                                                Ok
StubTest::testMethodMatcherWithConstruct | #6                                                                                                                Ok
StubTest::testMethodMatcherWithConstruct | #7                                                                                                                Ok
StubTest::testConstruct                                                                                                                                      Ok
StubTest::testMakeEmptyMethodReplaced                                                                                                                        Ok
StubTest::testMakeEmpty                                                                                                                                      Ok
StubTest::testMethodMatcherWithConstructEmptyExcept | #0                                                                                                     Ok
StubTest::testMethodMatcherWithConstructEmptyExcept | #1                                                                                                     Ok
StubTest::testMethodMatcherWithConstructEmptyExcept | #2                                                                                                     Ok
StubTest::testMethodMatcherWithConstructEmptyExcept | #3                                                                                                     Ok
StubTest::testMethodMatcherWithConstructEmptyExcept | #4                                                                                                     Ok
StubTest::testMethodMatcherWithConstructEmptyExcept | #5                                                                                                     Ok
StubTest::testMethodMatcherWithConstructEmptyExcept | #6                                                                                                     Ok
StubTest::testMethodMatcherWithConstructEmptyExcept | #7                                                                                                     Ok
StubTest::testMakeWithMagicalPropertiesReplaced                                                                                                              Ok
StubTest::testFactory                                                                                                                                        Ok
StubTest::testStubMakeEmptyInterface                                                                                                                         Ok
StubTest::testConstructMethodReplaced                                                                                                                        Ok
StubTest::testUpdate                                                                                                                                         Ok
StubTest::testMakeEmptyExceptPropertyReplaced                                                                                                                Ok
StubTest::testMakeEmptyMethodSimplyReplaced                                                                                                                  Ok
StubTest::testStubsFromObject                                                                                                                                Ok
StubTest::testConstructEmpty                                                                                                                                 Ok
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik May 11, 2016

Member

@Naktibalda can you take a look. Are we ok with this patch?

Member

DavertMik commented May 11, 2016

@Naktibalda can you take a look. Are we ok with this patch?

@DavertMik DavertMik merged commit 3e0a451 into 2.1 May 16, 2016

5 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
semaphoreci The build passed on Semaphore.
Details

@DavertMik DavertMik deleted the phpunit-54-fix-mock branch May 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment