Skip to content

Commit

Permalink
Merge pull request Ocramius#441 from malukenho/update-phpunit-namespaces
Browse files Browse the repository at this point in the history
Use namespaced version of "MockObject"
  • Loading branch information
Ocramius committed Feb 27, 2019
2 parents 59cc7f9 + 237dd14 commit 6a6c808
Show file tree
Hide file tree
Showing 72 changed files with 308 additions and 308 deletions.
6 changes: 3 additions & 3 deletions tests/ProxyManagerTest/Autoloader/AutoloaderTest.php
Expand Up @@ -4,8 +4,8 @@

namespace ProxyManagerTest\Autoloader;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject;
use ProxyManager\Autoloader\Autoloader;
use ProxyManager\FileLocator\FileLocatorInterface;
use ProxyManager\Generator\Util\UniqueIdentifierGenerator;
Expand All @@ -29,10 +29,10 @@ class AutoloaderTest extends TestCase
/** @var Autoloader */
protected $autoloader;

/** @var FileLocatorInterface|PHPUnit_Framework_MockObject_MockObject */
/** @var FileLocatorInterface|MockObject */
protected $fileLocator;

/** @var ClassNameInflectorInterface|PHPUnit_Framework_MockObject_MockObject */
/** @var ClassNameInflectorInterface|MockObject */
protected $classNameInflector;

/**
Expand Down
16 changes: 8 additions & 8 deletions tests/ProxyManagerTest/Factory/AbstractBaseFactoryTest.php
Expand Up @@ -4,8 +4,8 @@

namespace ProxyManagerTest\Factory;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject;
use ProxyManager\Autoloader\AutoloaderInterface;
use ProxyManager\Configuration;
use ProxyManager\Factory\AbstractBaseFactory;
Expand All @@ -32,26 +32,26 @@ class AbstractBaseFactoryTest extends TestCase
/**
* Note: we mock the class in order to assert on the abstract method usage
*
* @var AbstractBaseFactory|PHPUnit_Framework_MockObject_MockObject
* @var AbstractBaseFactory|MockObject
*/
private $factory;

/** @var ProxyGeneratorInterface|PHPUnit_Framework_MockObject_MockObject */
/** @var ProxyGeneratorInterface|MockObject */
private $generator;

/** @var ClassNameInflectorInterface|PHPUnit_Framework_MockObject_MockObject */
/** @var ClassNameInflectorInterface|MockObject */
private $classNameInflector;

/** @var GeneratorStrategyInterface|PHPUnit_Framework_MockObject_MockObject */
/** @var GeneratorStrategyInterface|MockObject */
private $generatorStrategy;

/** @var AutoloaderInterface|PHPUnit_Framework_MockObject_MockObject */
/** @var AutoloaderInterface|MockObject */
private $proxyAutoloader;

/** @var SignatureCheckerInterface|PHPUnit_Framework_MockObject_MockObject */
/** @var SignatureCheckerInterface|MockObject */
private $signatureChecker;

/** @var ClassSignatureGeneratorInterface|PHPUnit_Framework_MockObject_MockObject */
/** @var ClassSignatureGeneratorInterface|MockObject */
private $classSignatureGenerator;

/**
Expand Down
Expand Up @@ -4,8 +4,8 @@

namespace ProxyManagerTest\Factory;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject;
use ProxyManager\Autoloader\AutoloaderInterface;
use ProxyManager\Configuration;
use ProxyManager\Factory\AccessInterceptorScopeLocalizerFactory;
Expand All @@ -27,16 +27,16 @@
*/
class AccessInterceptorScopeLocalizerFactoryTest extends TestCase
{
/** @var PHPUnit_Framework_MockObject_MockObject */
/** @var MockObject */
protected $inflector;

/** @var PHPUnit_Framework_MockObject_MockObject */
/** @var MockObject */
protected $signatureChecker;

/** @var ClassSignatureGeneratorInterface|PHPUnit_Framework_MockObject_MockObject */
/** @var ClassSignatureGeneratorInterface|MockObject */
private $classSignatureGenerator;

/** @var Configuration|PHPUnit_Framework_MockObject_MockObject */
/** @var Configuration|MockObject */
protected $config;

/**
Expand Down
Expand Up @@ -4,8 +4,8 @@

namespace ProxyManagerTest\Factory;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject;
use ProxyManager\Autoloader\AutoloaderInterface;
use ProxyManager\Configuration;
use ProxyManager\Factory\AccessInterceptorValueHolderFactory;
Expand All @@ -26,16 +26,16 @@
*/
class AccessInterceptorValueHolderFactoryTest extends TestCase
{
/** @var PHPUnit_Framework_MockObject_MockObject */
/** @var MockObject */
protected $inflector;

/** @var PHPUnit_Framework_MockObject_MockObject */
/** @var MockObject */
protected $signatureChecker;

/** @var ClassSignatureGeneratorInterface|PHPUnit_Framework_MockObject_MockObject */
/** @var ClassSignatureGeneratorInterface|MockObject */
private $classSignatureGenerator;

/** @var Configuration|PHPUnit_Framework_MockObject_MockObject */
/** @var Configuration|MockObject */
protected $config;

/**
Expand Down
10 changes: 5 additions & 5 deletions tests/ProxyManagerTest/Factory/LazyLoadingGhostFactoryTest.php
Expand Up @@ -4,8 +4,8 @@

namespace ProxyManagerTest\Factory;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject;
use ProxyManager\Autoloader\AutoloaderInterface;
use ProxyManager\Configuration;
use ProxyManager\Factory\LazyLoadingGhostFactory;
Expand All @@ -24,16 +24,16 @@
*/
class LazyLoadingGhostFactoryTest extends TestCase
{
/** @var PHPUnit_Framework_MockObject_MockObject */
/** @var MockObject */
protected $inflector;

/** @var PHPUnit_Framework_MockObject_MockObject */
/** @var MockObject */
protected $signatureChecker;

/** @var ClassSignatureGeneratorInterface|PHPUnit_Framework_MockObject_MockObject */
/** @var ClassSignatureGeneratorInterface|MockObject */
private $classSignatureGenerator;

/** @var Configuration|PHPUnit_Framework_MockObject_MockObject */
/** @var Configuration|MockObject */
protected $config;

/**
Expand Down
Expand Up @@ -4,8 +4,8 @@

namespace ProxyManagerTest\Factory;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject;
use ProxyManager\Autoloader\AutoloaderInterface;
use ProxyManager\Configuration;
use ProxyManager\Factory\LazyLoadingValueHolderFactory;
Expand All @@ -26,16 +26,16 @@
*/
class LazyLoadingValueHolderFactoryTest extends TestCase
{
/** @var PHPUnit_Framework_MockObject_MockObject */
/** @var MockObject */
protected $inflector;

/** @var PHPUnit_Framework_MockObject_MockObject */
/** @var MockObject */
protected $signatureChecker;

/** @var ClassSignatureGeneratorInterface|PHPUnit_Framework_MockObject_MockObject */
/** @var ClassSignatureGeneratorInterface|MockObject */
private $classSignatureGenerator;

/** @var Configuration|PHPUnit_Framework_MockObject_MockObject */
/** @var Configuration|MockObject */
protected $config;

/**
Expand Down
10 changes: 5 additions & 5 deletions tests/ProxyManagerTest/Factory/NullObjectFactoryTest.php
Expand Up @@ -4,8 +4,8 @@

namespace ProxyManagerTest\Factory;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject;
use ProxyManager\Autoloader\AutoloaderInterface;
use ProxyManager\Configuration;
use ProxyManager\Factory\NullObjectFactory;
Expand All @@ -25,16 +25,16 @@
*/
class NullObjectFactoryTest extends TestCase
{
/** @var PHPUnit_Framework_MockObject_MockObject */
/** @var MockObject */
protected $inflector;

/** @var PHPUnit_Framework_MockObject_MockObject */
/** @var MockObject */
protected $signatureChecker;

/** @var ClassSignatureGeneratorInterface|PHPUnit_Framework_MockObject_MockObject */
/** @var ClassSignatureGeneratorInterface|MockObject */
private $classSignatureGenerator;

/** @var Configuration|PHPUnit_Framework_MockObject_MockObject */
/** @var Configuration|MockObject */
protected $config;

/**
Expand Down
Expand Up @@ -4,8 +4,8 @@

namespace ProxyManagerTest\Factory\RemoteObject\Adapter;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject;
use ProxyManager\Factory\RemoteObject\Adapter\BaseAdapter;
use Zend\Server\Client;

Expand All @@ -25,7 +25,7 @@ class BaseAdapterTest extends TestCase
*/
public function testBaseAdapter() : void
{
/** @var Client|PHPUnit_Framework_MockObject_MockObject $client */
/** @var Client|MockObject $client */
$client = $this
->getMockBuilder(Client::class)
->setMethods(['call'])
Expand Down Expand Up @@ -60,7 +60,7 @@ public function testBaseAdapter() : void
*/
public function testBaseAdapterWithServiceMap() : void
{
/** @var Client|PHPUnit_Framework_MockObject_MockObject $client */
/** @var Client|MockObject $client */
$client = $this
->getMockBuilder(Client::class)
->setMethods(['call'])
Expand Down
Expand Up @@ -4,8 +4,8 @@

namespace ProxyManagerTest\Factory\RemoteObject\Adapter;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject;
use ProxyManager\Factory\RemoteObject\Adapter\JsonRpc;
use Zend\Server\Client;

Expand All @@ -24,7 +24,7 @@ class JsonRpcTest extends TestCase
*/
public function testCanBuildAdapterWithJsonRpcClient() : void
{
/** @var Client|PHPUnit_Framework_MockObject_MockObject $client */
/** @var Client|MockObject $client */
$client = $this->getMockBuilder(Client::class)->setMethods(['call'])->getMock();

$adapter = new JsonRpc($client);
Expand Down
Expand Up @@ -4,8 +4,8 @@

namespace ProxyManagerTest\Factory\RemoteObject\Adapter;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject;
use ProxyManager\Factory\RemoteObject\Adapter\Soap;
use Zend\Server\Client;

Expand All @@ -24,7 +24,7 @@ class SoapTest extends TestCase
*/
public function testCanBuildAdapterWithSoapRpcClient() : void
{
/** @var Client|PHPUnit_Framework_MockObject_MockObject $client */
/** @var Client|MockObject $client */
$client = $this->getMockBuilder(Client::class)->setMethods(['call'])->getMock();

$adapter = new Soap($client);
Expand Down
Expand Up @@ -4,8 +4,8 @@

namespace ProxyManagerTest\Factory\RemoteObject\Adapter;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject;
use ProxyManager\Factory\RemoteObject\Adapter\XmlRpc;
use Zend\Server\Client;

Expand All @@ -24,7 +24,7 @@ class XmlRpcTest extends TestCase
*/
public function testCanBuildAdapterWithXmlRpcClient() : void
{
/** @var Client|PHPUnit_Framework_MockObject_MockObject $client */
/** @var Client|MockObject $client */
$client = $this->getMockBuilder(Client::class)->setMethods(['call'])->getMock();

$adapter = new XmlRpc($client);
Expand Down
12 changes: 6 additions & 6 deletions tests/ProxyManagerTest/Factory/RemoteObjectFactoryTest.php
Expand Up @@ -4,8 +4,8 @@

namespace ProxyManagerTest\Factory;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject;
use ProxyManager\Autoloader\AutoloaderInterface;
use ProxyManager\Configuration;
use ProxyManager\Factory\RemoteObject\AdapterInterface;
Expand All @@ -27,16 +27,16 @@
*/
class RemoteObjectFactoryTest extends TestCase
{
/** @var PHPUnit_Framework_MockObject_MockObject */
/** @var MockObject */
protected $inflector;

/** @var PHPUnit_Framework_MockObject_MockObject */
/** @var MockObject */
protected $signatureChecker;

/** @var ClassSignatureGeneratorInterface|PHPUnit_Framework_MockObject_MockObject */
/** @var ClassSignatureGeneratorInterface|MockObject */
private $classSignatureGenerator;

/** @var Configuration|PHPUnit_Framework_MockObject_MockObject */
/** @var Configuration|MockObject */
protected $config;

/**
Expand Down Expand Up @@ -84,7 +84,7 @@ public function testWillSkipAutoGeneration() : void
->with(BaseInterface::class)
->will(self::returnValue(RemoteObjectMock::class));

/** @var AdapterInterface|PHPUnit_Framework_MockObject_MockObject $adapter */
/** @var AdapterInterface|MockObject $adapter */
$adapter = $this->createMock(AdapterInterface::class);
$factory = new RemoteObjectFactory($adapter, $this->config);
/** @var stdClass|RemoteObjectMock $proxy */
Expand Down
Expand Up @@ -5,8 +5,8 @@
namespace ProxyManagerTest\Functional;

use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject;
use ProxyManager\Configuration;
use ProxyManager\Exception\UnsupportedProxiedClassException;
use ProxyManager\Factory\AccessInterceptorScopeLocalizerFactory;
Expand Down Expand Up @@ -65,7 +65,7 @@ public function testMethodCalls(string $className, object $instance, string $met
self::assertInternalType('callable', $callback);
self::assertSame($expectedValue, $callback(...array_values($params)));

/** @var callable|PHPUnit_Framework_MockObject_MockObject $listener */
/** @var callable|MockObject $listener */
$listener = $this->getMockBuilder(stdClass::class)->setMethods(['__invoke'])->getMock();
$listener
->expects(self::once())
Expand Down Expand Up @@ -118,7 +118,7 @@ public function testMethodCallsWithSuffixListener(

self::assertInternalType('callable', $callback);

/** @var callable|PHPUnit_Framework_MockObject_MockObject $listener */
/** @var callable|MockObject $listener */
$listener = $this->getMockBuilder(stdClass::class)->setMethods(['__invoke'])->getMock();
$listener
->expects(self::once())
Expand Down

0 comments on commit 6a6c808

Please sign in to comment.