Title: getMockBuilder() should also work with non-existent classes by Majkl578 · Pull Request #28 · phpstan/phpstan-phpunit · GitHub
Open Graph Title: getMockBuilder() should also work with non-existent classes by Majkl578 · Pull Request #28 · phpstan/phpstan-phpunit
X Title: getMockBuilder() should also work with non-existent classes by Majkl578 · Pull Request #28 · phpstan/phpstan-phpunit
Description: TestCase::getMockBuilder() can be used with undefined classes as well. In this case, the mock system creates dummy empty class of the given name. This is used in Doctrine on some places, i.e. for testing event listeners that are based on naming, not interface. Without this patch, we were getting the following errors: ------ ---------------------------------------------------------------------------- Line tests/Doctrine/Tests/DBAL/ConnectionTest.php ------ ---------------------------------------------------------------------------- 144 Call to method expects() on an unknown class ConnectDispatchEventListener. ------ ---------------------------------------------------------------------------- ------ ------------------------------------------------------------------------------------- Line tests/Doctrine/Tests/DBAL/Functional/Schema/SchemaManagerFunctionalTestCase.php ------ ------------------------------------------------------------------------------------- 349 Call to method expects() on an unknown class ListTableColumnsDispatchEventListener. 377 Call to method expects() on an unknown class ListTableIndexesDispatchEventListener. ------ ------------------------------------------------------------------------------------- ------ ------------------------------------------------------------------------------------- Line tests/Doctrine/Tests/DBAL/Platforms/AbstractPlatformTestCase.php ------ ------------------------------------------------------------------------------------- 372 Call to method expects() on an unknown class GetCreateTableSqlDispatchEvenListener. 375 Call to method expects() on an unknown class GetCreateTableSqlDispatchEvenListener. 396 Call to method expects() on an unknown class GetDropTableSqlDispatchEventListener. 421 Call to method expects() on an unknown class GetAlterTableSqlDispatchEvenListener. 424 Call to method expects() on an unknown class GetAlterTableSqlDispatchEvenListener. 427 Call to method expects() on an unknown class GetAlterTableSqlDispatchEvenListener. 430 Call to method expects() on an unknown class GetAlterTableSqlDispatchEvenListener. 433 Call to method expects() on an unknown class GetAlterTableSqlDispatchEvenListener. ------ ------------------------------------------------------------------------------------- No tests for Type\PHPUnit - how to add some?
Open Graph Description: TestCase::getMockBuilder() can be used with undefined classes as well. In this case, the mock system creates dummy empty class of the given name. This is used in Doctrine on some places, i.e. for t...
X Description: TestCase::getMockBuilder() can be used with undefined classes as well. In this case, the mock system creates dummy empty class of the given name. This is used in Doctrine on some places, i.e. for t...
Opengraph URL: https://github.com/phpstan/phpstan-phpunit/pull/28
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:47f51af5-0e07-4ef8-f6f2-9e18dddace74 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DEA6:1AEA15:581CA7:77BD36:6B00735F |
| html-safe-nonce | 90a75089079147af582b93527dbe5574560b837820380976ca0a193f48dc955f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERUE2OjFBRUExNTo1ODFDQTc6NzdCRDM2OjZCMDA3MzVGIiwidmlzaXRvcl9pZCI6IjIxNjU0MzY0NjI3Njg2MTYyODciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a2f237b2e4e77e2dca9b053ffb35d9e9459ad112a3b52b489cb18710b6c8c0c8 |
| hovercard-subject-tag | pull_request:209288494 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/phpstan/phpstan-phpunit/pull/28/files |
| twitter:image | https://avatars.githubusercontent.com/u/144181?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/144181?s=400&v=4 |
| og:image:alt | TestCase::getMockBuilder() can be used with undefined classes as well. In this case, the mock system creates dummy empty class of the given name. This is used in Doctrine on some places, i.e. for t... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 75c2b65dd205f26961d0c29afed1a8d0bb7cca9f05780571dfd1ef93eb539d16 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/phpstan/phpstan-phpunit git https://github.com/phpstan/phpstan-phpunit.git |
| octolytics-dimension-user_id | 16435710 |
| octolytics-dimension-user_login | phpstan |
| octolytics-dimension-repository_id | 105883921 |
| octolytics-dimension-repository_nwo | phpstan/phpstan-phpunit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 105883921 |
| octolytics-dimension-repository_network_root_nwo | phpstan/phpstan-phpunit |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 84e563eb4b55f8fa102f325f117533cee9e3df4a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width