Commit Graph

29 Commits

Author SHA1 Message Date
Matthew Brown
85ee5a080a
Remove template-typeof use 2020-09-28 13:25:39 -04:00
Bruce Weirdan
9c11bac834
Fix Prophecy-related issues
1. `prophesize()` has always been protected, not public
2. Provide generic definition for `prophesize()` implemented by `phpspec/prophecy-phpunit`
2020-08-24 22:32:11 +03:00
Tom Klingenberg
45fd05f355 Add TestCase::createConfigured/PartialMock() to stub
Previously the create-configured and create-partial mock-methods were not
part of the stub.

Add them.
2020-08-06 16:16:06 +02:00
Tom Klingenberg
9e9a8bb295 Fix visibility TestCase::createMock
Upstream PHPUnit\Framework\TestCase::createMock() is protected, not public.

Fix is to set the proper upstream visibility; change from public to
protected.

Public for the method introcuded back in 2018 in fa76f652. Checked against
Phpunit 7.5+ and 8.

Ref: fa76f65209
2020-08-05 03:44:06 +02:00
Tom Klingenberg
7355af1380 Remove superfluous phpcs:ignoreFile marker
Remove markers that command PHP_CodeSniffer (Pear package base-name for
"phpcs") to skip files based on their own configuration as those files
are already with the .phpstub extension which effectively has them not
configured/already ignored  by phpcs base/upstr. configuration (project
configuration file: phpcs.xml.dist)

Fix is to remove these markers/directives, also not all .phpstub files
had them therefore this is effectively streamlining the file formats
for .phpstub to this regard.
2020-08-05 03:42:35 +02:00
Tom Klingenberg
7ccaf51a10 Resolve Constraint for MockBuilder stubs
File contains two classes (one class and one interface), the mock-object
interface was missing resolution for Constraint.

This Constraint is PHPUnit\Framework\Constraint\Constraint.
2020-08-05 03:42:02 +02:00
Tom Klingenberg
a32a2c6899 WS-Fixes
Phpunit upstream indents (prefixes) docblock @param annotations and I can
imagine that some white-space has been taken over from that into the stub
files when writing them.

Also for separation by  empty lines between methods which looks as well
as an error quickly porting from upstream (better than anything else).
2020-08-05 03:41:22 +02:00
Feek
1000bb6929 fix: Argument::that allows params 2020-05-24 12:52:09 -07:00
Bruce Weirdan
63838b8e39
Bump PHPUnit to 7.5+
Codeception 4.x is not compatible with lower versions
2020-04-05 21:43:16 +03:00
Bruce Weirdan
5128529ca9
Rename stubs from *.php to *.phpstub
This hides them from PHPStorm, preventing false positives it used to
emit.
2020-04-05 20:49:25 +03:00
Witold Wasiczko
aa0be36782
Assert functions are public and static 2020-04-01 20:11:28 +02:00
Bruce Weirdan
8b0805670e
Limit expectException()'s argument to throwables 2019-02-14 13:12:40 +02:00
SignpostMarv
3af740709d void is a reserved word 2019-02-13 21:03:21 +00:00
SignpostMarv
a7c87a2d09 stripping trailing whitespace 2019-02-13 21:01:58 +00:00
Bruce Weirdan
2f2ff0374f
Added PHPUnit 7.5 assertions 2019-02-11 05:31:13 +02:00
Matthew Brown
65b5b19c95
Remove @template-typeof annotations 2019-01-14 12:17:35 -05:00
Matthew Brown
3e99b8775a
Widen inputs 2019-01-08 14:09:49 -05:00
Bruce Weirdan
0fd0b47765
added missing use 2018-12-10 13:02:12 +02:00
Bruce Weirdan
ef91c747fe
Added Prophecy support 2018-12-09 00:26:47 +02:00
Bruce Weirdan
4605575b4d
method() returns InvocationMocker and dropped methods that are not actually present on MockObject 2018-12-01 05:10:20 +02:00
Matthew Brown
5fd3db0c48 Add support for better mocking 2018-11-25 01:40:30 -05:00
Matthew Brown
0c8386711c Improve mocking support 2018-11-24 18:27:52 -05:00
Matthew Brown
b920963c88
Remove assertEquals - too simple for PHPUnit's assertions 2018-11-16 12:56:32 -05:00
Matthew Brown
6a387da8e2
Add message arg 2018-11-16 11:11:43 -05:00
Matthew Brown
340eedabfe
Add assertNotSame and assertNotEquals 2018-11-16 11:05:51 -05:00
Matthew Brown
5c7b479ada
Add assertSame and assertEquals 2018-11-16 10:15:09 -05:00
Matthew Brown
88051affb7
Fix assertTrue/assertFalse 2018-11-14 13:08:56 -05:00
Matthew Brown
b49f07b34b Put asserts in proper place 2018-11-14 09:23:26 -05:00
Matthew Brown
fa76f65209 Add starter files for PHPUnit Plugin 2018-11-14 00:36:33 -05:00