forked from phpstan/phpstan-phpunit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide the same functionality in simpler way with stubs
- Loading branch information
1 parent
79d30f7
commit 846a5fa
Showing
7 changed files
with
119 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
47 changes: 0 additions & 47 deletions
47
src/Type/PHPUnit/GetMockBuilderDynamicReturnTypeExtension.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace PHPUnit\Framework\MockObject; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
/** | ||
* @template TMockedClass | ||
*/ | ||
class MockBuilder | ||
{ | ||
|
||
/** | ||
* @param TestCase $testCase | ||
* @param class-string<TMockedClass> $type | ||
*/ | ||
public function __construct(TestCase $testCase, $type) {} | ||
|
||
/** | ||
* @return MockObject&TMockedClass | ||
*/ | ||
public function getMock() {} | ||
|
||
/** | ||
* @return MockObject&TMockedClass | ||
*/ | ||
public function getMockForAbstractClass() {} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?php | ||
|
||
namespace PHPUnit\Framework; | ||
|
||
use PHPUnit\Framework\MockObject\MockObject; | ||
use PHPUnit\Framework\MockObject\MockBuilder; | ||
|
||
class TestCase | ||
{ | ||
|
||
/** | ||
* @template T | ||
* @param class-string<T> $originalClassName | ||
* @return MockObject&T | ||
*/ | ||
public function createMock($originalClassName) {} | ||
|
||
/** | ||
* @template T | ||
* @param class-string<T> $className | ||
* @return MockBuilder<T> | ||
*/ | ||
public function getMockBuilder(string $className) {} | ||
|
||
/** | ||
* @template T | ||
* @param class-string<T> $originalClassName | ||
* @return MockObject&T | ||
*/ | ||
public function createConfiguredMock($originalClassName) {} | ||
|
||
/** | ||
* @template T | ||
* @param class-string<T> $originalClassName | ||
* @param string[] $methods | ||
* @return MockObject&T | ||
*/ | ||
public function createPartialMock($originalClassName, array $methods) {} | ||
|
||
/** | ||
* @template T | ||
* @param class-string<T> $originalClassName | ||
* @return MockObject&T | ||
*/ | ||
public function createTestProxy($originalClassName) {} | ||
|
||
/** | ||
* @template T | ||
* @param class-string<T> $originalClassName | ||
* @param string $mockClassName | ||
* @param bool $callOriginalConstructor | ||
* @param bool $callOriginalClone | ||
* @param bool $callAutoload | ||
* @param string[] $mockedMethods | ||
* @param bool $cloneArguments | ||
* @return MockObject&T | ||
*/ | ||
protected function getMockForAbstractClass($originalClassName, array $arguments = [], $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = [], $cloneArguments = false) {} | ||
|
||
/** | ||
* @template T | ||
* @param string $wsdlFile | ||
* @param class-string<T> $originalClassName | ||
* @param string $mockClassName | ||
* @param bool $callOriginalConstructor | ||
* @param array $options | ||
* @return MockObject&T | ||
*/ | ||
protected function getMockFromWsdl($wsdlFile, $originalClassName = '', $mockClassName = '', array $methods = [], $callOriginalConstructor = true, array $options = []) {} | ||
|
||
/** | ||
* @param class-string<\Throwable> $exception | ||
* @return void | ||
*/ | ||
public function expectException(string $exception) {} | ||
|
||
} |