Skip to content

Commit

Permalink
Merge pull request #81 from ktomk/patch-stubs-1
Browse files Browse the repository at this point in the history
Patch stubs 1
  • Loading branch information
weirdan authored Aug 6, 2020
2 parents 88d4648 + 45fd05f commit 6b873b5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion stubs/Assert_75.phpstub
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // phpcs:ignoreFile
<?php
namespace PHPUnit\Framework;

abstract class Assert
Expand Down
3 changes: 2 additions & 1 deletion stubs/MockBuilder.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ namespace PHPUnit\Framework\MockObject;

use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\MockObject\Builder\InvocationMocker;
use PHPUnit\Framework\Constraint\Constraint;

/**
* @template T
Expand All @@ -11,7 +12,7 @@ class MockBuilder
{
/**
* @template-typeof T $type
* @param TestCase $testCase
* @param TestCase $testCase
* @param class-string $type
*/
public function __construct(TestCase $testCase, $type) {}
Expand Down
23 changes: 21 additions & 2 deletions stubs/TestCase.phpstub
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // phpcs:ignoreFile
<?php
namespace PHPUnit\Framework;

use PHPUnit\Framework\MockObject\MockObject;
Expand All @@ -12,7 +12,25 @@ abstract class TestCase extends Assert implements Test, SelfDescribing
* @param class-string<T> $class
* @return MockObject&T
*/
public function createMock($class) {}
protected function createMock($class) {}

/**
* @template T
* @param class-string<T> $class
* @param array<string, mixed> $config
* @return MockObject&T
*/
protected function createConfiguredMock($class, array $config) {}

/**
* Returns a partial test double for the specified class.
*
* @template T
* @param class-string<T> $class
* @param array<array-key, string> $methods
* @return MockObject&T
*/
protected function createPartialMock($class, array $methods) {}

/**
* Returns a builder object to create mock objects using a fluent interface.
Expand All @@ -30,6 +48,7 @@ abstract class TestCase extends Assert implements Test, SelfDescribing
* @return ObjectProphecy<T>
*/
public function prophesize($classOrInterface): ObjectProphecy {}

/**
* @param class-string<\Throwable> $exception
* @return void
Expand Down

0 comments on commit 6b873b5

Please sign in to comment.