psalm-plugin-phpunit/stubs/TestCase.phpstub

58 lines
1.4 KiB
Plaintext
Raw Normal View History

<?php
2018-11-14 06:36:33 +01:00
namespace PHPUnit\Framework;
use PHPUnit\Framework\MockObject\MockObject;
2018-11-25 00:27:52 +01:00
use PHPUnit\Framework\MockObject\MockBuilder;
2018-12-10 12:02:12 +01:00
use Prophecy\Prophecy\ObjectProphecy;
2018-11-14 06:36:33 +01:00
abstract class TestCase extends Assert implements Test, SelfDescribing
{
/**
* @template T
2019-01-14 18:17:35 +01:00
* @param class-string<T> $class
2018-11-14 06:36:33 +01:00
* @return MockObject&T
*/
protected function createMock($class) {}
2018-11-25 00:27:52 +01:00
/**
* @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) {}
2018-11-25 00:27:52 +01:00
/**
* Returns a builder object to create mock objects using a fluent interface.
*
* @template T
2019-01-14 18:17:35 +01:00
* @param class-string<T> $className
2018-11-25 00:27:52 +01:00
*
* @return MockBuilder<T>
*/
public function getMockBuilder(string $className) {}
2018-12-08 23:26:47 +01:00
/**
* @template T
2019-01-14 18:17:35 +01:00
* @param class-string<T> $classOrInterface
2018-12-08 23:26:47 +01:00
* @return ObjectProphecy<T>
*/
public function prophesize($classOrInterface): ObjectProphecy {}
/**
* @param class-string<\Throwable> $exception
* @return void
*/
public function expectException(string $exception) {}
2018-11-25 00:27:52 +01:00
}