Rename FOQ namespaces and services to FOS
This commit is contained in:
parent
4e11e20071
commit
3fb9aaa56a
76 changed files with 352 additions and 352 deletions
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace FOQ\ElasticaBundle\Tests\Manager;
|
||||
namespace FOS\ElasticaBundle\Tests\Manager;
|
||||
|
||||
use FOQ\ElasticaBundle\Manager\RepositoryManager;
|
||||
use FOS\ElasticaBundle\Manager\RepositoryManager;
|
||||
|
||||
class CustomRepository{}
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ class RepositoryManagerTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
public function testThatGetRepositoryReturnsDefaultRepository()
|
||||
{
|
||||
$finderMock = $this->getMockBuilder('FOQ\ElasticaBundle\Finder\TransformedFinder')
|
||||
$finderMock = $this->getMockBuilder('FOS\ElasticaBundle\Finder\TransformedFinder')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
|
@ -24,17 +24,17 @@ class RepositoryManagerTest extends \PHPUnit_Framework_TestCase
|
|||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
$entityName = 'FOQ\ElasticaBundle\Tests\Manager\Entity';
|
||||
$entityName = 'FOS\ElasticaBundle\Tests\Manager\Entity';
|
||||
|
||||
$manager = new RepositoryManager($readerMock);
|
||||
$manager->addEntity($entityName, $finderMock);
|
||||
$repository = $manager->getRepository($entityName);
|
||||
$this->assertInstanceOf('FOQ\ElasticaBundle\Repository', $repository);
|
||||
$this->assertInstanceOf('FOS\ElasticaBundle\Repository', $repository);
|
||||
}
|
||||
|
||||
public function testThatGetRepositoryReturnsCustomRepository()
|
||||
{
|
||||
$finderMock = $this->getMockBuilder('FOQ\ElasticaBundle\Finder\TransformedFinder')
|
||||
$finderMock = $this->getMockBuilder('FOS\ElasticaBundle\Finder\TransformedFinder')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
|
@ -42,12 +42,12 @@ class RepositoryManagerTest extends \PHPUnit_Framework_TestCase
|
|||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
$entityName = 'FOQ\ElasticaBundle\Tests\Manager\Entity';
|
||||
$entityName = 'FOS\ElasticaBundle\Tests\Manager\Entity';
|
||||
|
||||
$manager = new RepositoryManager($readerMock);
|
||||
$manager->addEntity($entityName, $finderMock, 'FOQ\ElasticaBundle\Tests\Manager\CustomRepository');
|
||||
$manager->addEntity($entityName, $finderMock, 'FOS\ElasticaBundle\Tests\Manager\CustomRepository');
|
||||
$repository = $manager->getRepository($entityName);
|
||||
$this->assertInstanceOf('FOQ\ElasticaBundle\Tests\Manager\CustomRepository', $repository);
|
||||
$this->assertInstanceOf('FOS\ElasticaBundle\Tests\Manager\CustomRepository', $repository);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -55,7 +55,7 @@ class RepositoryManagerTest extends \PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testThatGetRepositoryThrowsExceptionIfEntityNotConfigured()
|
||||
{
|
||||
$finderMock = $this->getMockBuilder('FOQ\ElasticaBundle\Finder\TransformedFinder')
|
||||
$finderMock = $this->getMockBuilder('FOS\ElasticaBundle\Finder\TransformedFinder')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ class RepositoryManagerTest extends \PHPUnit_Framework_TestCase
|
|||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
$entityName = 'FOQ\ElasticaBundle\Tests\Manager\Entity';
|
||||
$entityName = 'FOS\ElasticaBundle\Tests\Manager\Entity';
|
||||
|
||||
$manager = new RepositoryManager($readerMock);
|
||||
$manager->addEntity($entityName, $finderMock);
|
||||
|
|
@ -75,7 +75,7 @@ class RepositoryManagerTest extends \PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testThatGetRepositoryThrowsExceptionIfCustomRepositoryNotFound()
|
||||
{
|
||||
$finderMock = $this->getMockBuilder('FOQ\ElasticaBundle\Finder\TransformedFinder')
|
||||
$finderMock = $this->getMockBuilder('FOS\ElasticaBundle\Finder\TransformedFinder')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
|
|
@ -83,10 +83,10 @@ class RepositoryManagerTest extends \PHPUnit_Framework_TestCase
|
|||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
$entityName = 'FOQ\ElasticaBundle\Tests\Manager\Entity';
|
||||
$entityName = 'FOS\ElasticaBundle\Tests\Manager\Entity';
|
||||
|
||||
$manager = new RepositoryManager($readerMock);
|
||||
$manager->addEntity($entityName, $finderMock, 'FOQ\ElasticaBundle\Tests\MissingRepository');
|
||||
$manager->addEntity($entityName, $finderMock, 'FOS\ElasticaBundle\Tests\MissingRepository');
|
||||
$manager->getRepository('Missing Entity');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue