28 lines
1002 B
PHP
28 lines
1002 B
PHP
<?php
|
|
|
|
namespace ActivityPub\Test\TestConfig;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use Symfony\Component\HttpFoundation\Request;
|
|
|
|
abstract class APTestCase extends TestCase
|
|
{
|
|
function getMock( $originalClassName, $methods = array(), array $arguments = array(), $mockClassName = '', $callOriginalConstructor = false, $callOriginalClone = false, $callAutoload = true, $cloneArguments = false, $callOriginalMethods = false, $proxyTarget = null )
|
|
{
|
|
return parent::getMock( $originalClassName, $methods, $arguments, $mockClassName, $callOriginalConstructor, $callOriginalClone, $callAutoload, $cloneArguments, $callOriginalMethods, $proxyTarget ); // TODO: Change the autogenerated stub
|
|
}
|
|
|
|
/**
|
|
* @param string $uri
|
|
* @param array $attributes
|
|
* @return Request
|
|
*/
|
|
public static function requestWithAttributes( $uri, $attributes )
|
|
{
|
|
$request = Request::create( $uri );
|
|
$request->attributes->add( $attributes );
|
|
return $request;
|
|
}
|
|
|
|
}
|