2019-02-07 03:48:00 +00:00
|
|
|
<?php
|
2019-02-16 17:51:24 +00:00
|
|
|
|
2019-02-07 03:48:00 +00:00
|
|
|
namespace ActivityPub\Test\TestConfig;
|
|
|
|
|
|
|
|
use PHPUnit\Framework\TestCase;
|
2019-03-02 19:13:39 +00:00
|
|
|
use Symfony\Component\HttpFoundation\Request;
|
2019-02-07 03:48:00 +00:00
|
|
|
|
|
|
|
abstract class APTestCase extends TestCase
|
|
|
|
{
|
2019-02-16 17:51:24 +00:00
|
|
|
function getMock( $originalClassName, $methods = array(), array $arguments = array(), $mockClassName = '', $callOriginalConstructor = false, $callOriginalClone = false, $callAutoload = true, $cloneArguments = false, $callOriginalMethods = false, $proxyTarget = null )
|
2019-02-07 03:48:00 +00:00
|
|
|
{
|
2019-02-16 17:51:24 +00:00
|
|
|
return parent::getMock( $originalClassName, $methods, $arguments, $mockClassName, $callOriginalConstructor, $callOriginalClone, $callAutoload, $cloneArguments, $callOriginalMethods, $proxyTarget ); // TODO: Change the autogenerated stub
|
2019-02-07 03:48:00 +00:00
|
|
|
}
|
2019-03-02 19:13:39 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param string $uri
|
|
|
|
* @param array $attributes
|
|
|
|
* @return Request
|
|
|
|
*/
|
|
|
|
public static function requestWithAttributes( $uri, $attributes )
|
|
|
|
{
|
|
|
|
$request = Request::create( $uri );
|
|
|
|
$request->attributes->add( $attributes );
|
|
|
|
return $request;
|
|
|
|
}
|
|
|
|
|
2019-02-07 03:48:00 +00:00
|
|
|
}
|