mirror of
https://github.com/danog/psalm-plugin-phpunit.git
synced 2024-11-26 20:15:08 +01:00
9c11bac834
1. `prophesize()` has always been protected, not public 2. Provide generic definition for `prophesize()` implemented by `phpspec/prophecy-phpunit`
58 lines
1.4 KiB
Plaintext
58 lines
1.4 KiB
Plaintext
<?php
|
|
namespace PHPUnit\Framework;
|
|
|
|
use PHPUnit\Framework\MockObject\MockObject;
|
|
use PHPUnit\Framework\MockObject\MockBuilder;
|
|
use Prophecy\Prophecy\ObjectProphecy;
|
|
|
|
abstract class TestCase extends Assert implements Test, SelfDescribing
|
|
{
|
|
/**
|
|
* @template T
|
|
* @param class-string<T> $class
|
|
* @return MockObject&T
|
|
*/
|
|
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.
|
|
*
|
|
* @template T
|
|
* @param class-string<T> $className
|
|
*
|
|
* @return MockBuilder<T>
|
|
*/
|
|
public function getMockBuilder(string $className) {}
|
|
|
|
/**
|
|
* @template T
|
|
* @param class-string<T> $classOrInterface
|
|
* @return ObjectProphecy<T>
|
|
*/
|
|
protected function prophesize($classOrInterface): ObjectProphecy {}
|
|
|
|
/**
|
|
* @param class-string<\Throwable> $exception
|
|
* @return void
|
|
*/
|
|
public function expectException(string $exception) {}
|
|
}
|