Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[Tests] Rename testsuite #61

Merged
merged 4 commits into from

2 participants

@Baachi
Collaborator

I have rename the Util namespace to Doctrine\Tests.
I think its more consistent, because other library from the doctrine project have the same directory
structure.

@mikelohmann
Collaborator

It is not automatically merge able. Can you check it, please?

@Baachi Baachi Rename the "Util" folder to "Doctrine/Tests"
Fix any errors in the testsuite

Create composer support

Remove vendor folder

Rename testsuite
9194ef1
@Baachi
Collaborator

Can you try again?

@Baachi
Collaborator
@mikelohmann
Collaborator

Tells me the same. I will have a Look closely. Sorry for the Delay.

@Baachi Baachi merged commit 01b14b5 into doctrine:master
@Baachi Baachi deleted the Baachi:rename-testsuite branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 14, 2012
  1. @Baachi

    Rename the "Util" folder to "Doctrine/Tests"

    Baachi authored
    Fix any errors in the testsuite
    
    Create composer support
    
    Remove vendor folder
    
    Rename testsuite
Commits on Feb 3, 2013
  1. @Baachi

    Fix merge errors

    Baachi authored
  2. @Baachi
  3. @Baachi

    Refactor travis-ci config file

    Baachi authored
This page is out of date. Refresh to see the latest.
Showing with 405 additions and 125 deletions.
  1. +4 −2 .travis.yml
  2. +8 −4 composer.json
  3. +308 −0 composer.lock
  4. +6 −1 lib/Doctrine/Search/Mapping/ClassMetadataFactory.php
  5. +1 −6 phpunit.xml.dist
  6. 0  tests/{Unit/Doctrine → Doctrine/Tests}/Search/ConfigurationTest.php
  7. +1 −1  tests/{Unit/Doctrine → Doctrine/Tests}/Search/Documents/BlogPost.php
  8. +1 −1  tests/{Unit/Doctrine → Doctrine/Tests}/Search/ElasticSearch/Tests/ClientTest.php
  9. +40 −52 tests/{Unit/Doctrine → Doctrine/Tests}/Search/Http/Client/BuzzTest.php
  10. +1 −1  tests/{Unit/Doctrine → Doctrine/Tests}/Search/Http/Client/CurlClientTest.php
  11. +2 −2 tests/{Unit/Doctrine → Doctrine/Tests}/Search/Listener/MongoDBSearchListenerTest.php
  12. +1 −1  tests/{Unit/Doctrine → Doctrine/Tests}/Search/Mapping/ClassMetadataFactoryTest.php
  13. +3 −3 tests/{Unit/Doctrine → Doctrine/Tests}/Search/Mapping/ClassMetadataTest.php
  14. +24 −26 tests/{Unit/Doctrine → Doctrine/Tests}/Search/Mapping/Driver/AnnotationDriverTest.php
  15. +3 −3 tests/{Unit/Doctrine → Doctrine/Tests}/Search/SearchManagerTest.php
  16. +1 −1  tests/{Unit/Doctrine → Doctrine/Tests}/Search/VersionTest.php
  17. +0 −13 tests/Unit/Doctrine/Search/Http/Client/Mocks/FileGetContentsMock.php
  18. +0 −7 tests/Unit/Doctrine/Search/Solr/Tests/ClientTest.php
  19. +1 −1  tests/bootstrap.php
View
6 .travis.yml
@@ -4,6 +4,8 @@ php:
- 5.3
- 5.4
-before_script: php lib/vendor/vendors.php
+before_script:
+ - curl -s https://getcomposer.org/installer | php
+ - php composer.phar install --dev
-script: phpunit
+script: phpunit --coverage-textp
View
12 composer.json
@@ -8,13 +8,17 @@
"require": {
"php": ">=5.3.2",
- "kriswallsmith/buzz": "dev-master",
- "doctrine/common": "dev-master",
- "doctrine/mongodb-odm": "dev-master"
+ "doctrine/common": "2.3.*"
+ },
+ "require-dev": {
+ "kriswallsmith/buzz": "0.7.*",
+ "doctrine/mongodb": "1.0.*",
+ "doctrine/mongodb-odm": "1.0.*"
},
"autoload": {
"psr-0": {
"Doctrine\\Search": "lib/"
}
- }
+ },
+ "minimum-stability": "dev"
}
View
308 composer.lock
@@ -0,0 +1,308 @@
+{
+ "hash": "85e07875ac23a3f06a93ce47c33884cd",
+ "packages": [
+ {
+ "name": "doctrine/common",
+ "version": "2.3.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/common",
+ "reference": "bb0aebbf234db52df476a2b473d434745b34221c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/common/archive/bb0aebbf234db52df476a2b473d434745b34221c.zip",
+ "reference": "bb0aebbf234db52df476a2b473d434745b34221c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "time": "2012-09-20 05:55:18",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.3.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\Common": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com",
+ "homepage": "http://www.jwage.com/"
+ },
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com",
+ "homepage": "http://www.instaclick.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh",
+ "role": "Developer of wrapped JMSSerializerBundle"
+ }
+ ],
+ "description": "Common Library for Doctrine projects",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "annotations",
+ "collections",
+ "eventmanager",
+ "persistence",
+ "spl"
+ ]
+ }
+ ],
+ "packages-dev": [
+ {
+ "name": "doctrine/mongodb",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/mongodb",
+ "reference": "1.0.1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/mongodb/archive/1.0.1.zip",
+ "reference": "1.0.1",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/common": ">=2.1.0,<2.5-dev",
+ "ext-mongo": ">=1.2.12,<1.4-dev",
+ "php": ">=5.3.2"
+ },
+ "time": "2013-01-10 20:57:52",
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\MongoDB": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Bulat Shakirzyanov",
+ "email": "mallluhuct@gmail.com",
+ "homepage": "http://avalanche123.com"
+ },
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com",
+ "homepage": "http://www.jwage.com/"
+ },
+ {
+ "name": "Kris Wallsmith",
+ "email": "kris.wallsmith@gmail.com",
+ "homepage": "http://kriswallsmith.net/"
+ },
+ {
+ "name": "Jeremy Mikola",
+ "email": "jmikola@gmail.com",
+ "homepage": "http://jmikola.net"
+ }
+ ],
+ "description": "Doctrine MongoDB Abstraction Layer",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "database",
+ "mongodb",
+ "persistence"
+ ]
+ },
+ {
+ "name": "doctrine/mongodb-odm",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/mongodb-odm.git",
+ "reference": "fd6da3f59e094698b12e4819f93228d281449634"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/mongodb-odm/zipball/fd6da3f59e094698b12e4819f93228d281449634",
+ "reference": "fd6da3f59e094698b12e4819f93228d281449634",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/common": ">=2.2.0,<2.5-dev",
+ "doctrine/mongodb": "1.0.*",
+ "php": ">=5.3.2",
+ "symfony/console": ">=2.0-dev,<2.3-dev"
+ },
+ "require-dev": {
+ "symfony/yaml": ">=2.0-dev,<2.3-dev"
+ },
+ "suggest": {
+ "symfony/yaml": "Enables the YAML metadata mapping driver"
+ },
+ "time": "2013-01-31 15:18:27",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\ODM\\MongoDB": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Bulat Shakirzyanov",
+ "email": "mallluhuct@gmail.com",
+ "homepage": "http://avalanche123.com"
+ },
+ {
+ "name": "Jonathan H. Wage",
+ "email": "jonwage@gmail.com",
+ "homepage": "http://www.jwage.com/"
+ },
+ {
+ "name": "Kris Wallsmith",
+ "email": "kris.wallsmith@gmail.com",
+ "homepage": "http://kriswallsmith.net/"
+ },
+ {
+ "name": "Jeremy Mikola",
+ "email": "jmikola@gmail.com",
+ "homepage": "http://jmikola.net"
+ }
+ ],
+ "description": "Doctrine MongoDB Object Document Mapper",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "database",
+ "mongodb",
+ "odm",
+ "persistence"
+ ]
+ },
+ {
+ "name": "kriswallsmith/buzz",
+ "version": "v0.7",
+ "source": {
+ "type": "git",
+ "url": "http://github.com/kriswallsmith/Buzz.git",
+ "reference": "v0.7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/kriswallsmith/Buzz/zipball/v0.7",
+ "reference": "v0.7",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "suggest": {
+ "ext-curl": "*"
+ },
+ "time": "2012-06-25 12:01:38",
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "Buzz": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Kris Wallsmith",
+ "email": "kris.wallsmith@gmail.com",
+ "homepage": "http://kriswallsmith.net/"
+ }
+ ],
+ "description": "Lightweight HTTP client",
+ "homepage": "https://github.com/kriswallsmith/Buzz",
+ "keywords": [
+ "curl",
+ "http client"
+ ]
+ },
+ {
+ "name": "symfony/console",
+ "version": "2.2.x-dev",
+ "target-dir": "Symfony/Component/Console",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/Console",
+ "reference": "fdb2d9320106926266a0f7a5a97aab7213e11ad6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/Console/zipball/fdb2d9320106926266a0f7a5a97aab7213e11ad6",
+ "reference": "fdb2d9320106926266a0f7a5a97aab7213e11ad6",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "time": "2013-01-24 15:55:08",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.2-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\Console\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Console Component",
+ "homepage": "http://symfony.com"
+ }
+ ],
+ "aliases": [
+
+ ],
+ "minimum-stability": "dev",
+ "stability-flags": [
+
+ ]
+}
View
7 lib/Doctrine/Search/Mapping/ClassMetadataFactory.php
@@ -104,7 +104,7 @@ protected function getDriver()
* @param bool $rootEntityFound
* @return void
*/
- protected function doLoadMetadata($class, $parent, $rootEntityFound)
+ protected function doLoadMetadata($class, $parent, $rootEntityFound, array $nonSuperclassParents)
{
//Manipulates $classMetadata;
$this->driver->loadMetadataForClass($class->getName(), $class);
@@ -146,4 +146,9 @@ protected function initializeReflection(BaseClassMetadata $class, ReflectionServ
{
// TODO: Implement initializeReflection() method.
}
+
+ protected function isEntity(BaseClassMetadata $class)
+ {
+
+ }
}
View
7 phpunit.xml.dist
@@ -13,15 +13,10 @@
>
<testsuites>
<testsuite name="Doctrine Search Test Suite">
- <directory>./tests/Unit/Doctrine/Search</directory>
+ <directory>./tests/Doctrine/Tests/Search</directory>
</testsuite>
</testsuites>
- <php>
- <!-- <server name="CLOSURE_JAR" value="/path/to/google-closure/compiler.jar" /> -->
- <!-- <server name="COFFEE_BIN" value="/path/to/coffee" /> -->
- </php>
-
<filter>
<whitelist>
<directory suffix=".php">./lib/Doctrine/Search</directory>
View
0  ...nit/Doctrine/Search/ConfigurationTest.php → ...ctrine/Tests/Search/ConfigurationTest.php
File renamed without changes
View
2  ...it/Doctrine/Search/Documents/BlogPost.php → ...trine/Tests/Search/Documents/BlogPost.php
@@ -1,6 +1,6 @@
<?php
-namespace Unit\Doctrine\Search\Documents;
+namespace Doctrine\Tests\Search\Documents;
use Doctrine\Search\Mapping\Annotations as SEARCH;
View
2  ...Search/ElasticSearch/Tests/ClientTest.php → ...Search/ElasticSearch/Tests/ClientTest.php
@@ -1,5 +1,5 @@
<?php
-namespace Unit\Doctrine\Search\ElasticSearch\Tests;
+namespace Doctrine\Tests\Search\ElasticSearch\Tests;
use Doctrine\Search\ElasticSearch\Client;
use Doctrine\Search\ElasticSearch\Connection;
use Doctrine\Search\Http\Response\BuzzResponse;
View
92 .../Doctrine/Search/Http/Client/BuzzTest.php → ...ine/Tests/Search/Http/Client/BuzzTest.php
@@ -1,53 +1,41 @@
-<?php
-namespace Unit\Doctrine\Search\Http\Adapter\Client;
-
-use Unit\Doctrine\Search\Http\Client\Mocks\FileGetContentsMock;
-
-use Doctrine\Search\Http\Client\BuzzClient;
-use Buzz\Browser;
-
-/**
- * @author Bachi
- */
-class BuzzTest extends \PHPUnit_Framework_TestCase
-{
- private $client;
-
- private $browser;
-
- protected function setUp()
- {
- $this->browser = $this->getMock('Buzz\\Browser', array(), array(), '', false);
- $this->client = new BuzzClient($this->browser, 'www.google.de', 80);
- }
-
- public function testCallExistingHost()
- {
- $buzzResponse = $this->getMock('Buzz\\Message\\Response');
-
- $this->browser->expects($this->once())
- ->method('call')
- ->will($this->returnValue($buzzResponse));
-
- $response = $this->client->sendRequest();
- $this->assertInstanceOf('Doctrine\\Search\\Http\\ResponseInterface', $response);
-
- //@todo this should be tested in the Response-Test
- /*$this->assertContains('<html>', $response->getContent());
- $this->assertTrue($response->isSuccessfull());*/
- }
-
-
- public function testCallNotExistingHost()
- {
- $this->setExpectedException('\RuntimeException');
-
- $clientAdapter = new FileGetContentsMock();
-
- $browser = new Browser($clientAdapter);
-
- $client = new BuzzClient($browser, 'www.not-existing-host.de', 80);
- $client->sendRequest('get');
- }
-
+<?php
+namespace Doctrine\Tests\Search\Http\Adapter\Client;
+
+use Doctrine\Tests\Search\Http\Client\Mocks\FileGetContentsMock;
+
+use Doctrine\Search\Http\Client\BuzzClient;
+use Buzz\Browser;
+
+/**
+ * @author Bachi
+ */
+class BuzzTest extends \PHPUnit_Framework_TestCase
+{
+ private $client;
+
+ private $browser;
+
+ protected function setUp()
+ {
+ $this->browser = $this->getMock('Buzz\\Browser', array(), array(), '', false);
+ $this->client = new BuzzClient($this->browser, 'www.google.de', 80);
+ }
+
+ public function testCallExistingHost()
+ {
+ $buzzResponse = $this->getMockBuilder('Buzz\\Message\\Response')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->browser->expects($this->once())
+ ->method('call')
+ ->will($this->returnValue($buzzResponse));
+
+ $response = $this->client->sendRequest();
+ $this->assertInstanceOf('Doctrine\\Search\\Http\\ResponseInterface', $response);
+
+ //@todo this should be tested in the Response-Test
+ /*$this->assertContains('<html>', $response->getContent());
+ $this->assertTrue($response->isSuccessfull());*/
+ }
}
View
2  ...ine/Search/Http/Client/CurlClientTest.php → ...sts/Search/Http/Client/CurlClientTest.php
@@ -1,5 +1,5 @@
<?php
-namespace Unit\Doctrine\Search\Http\Client;
+namespace Doctrine\Tests\Search\Http\Client;
use Doctrine\Search\Http\Client\CurlClient;
View
4 ...ch/Listener/MongoDBSearchListenerTest.php → ...ch/Listener/MongoDBSearchListenerTest.php
@@ -1,5 +1,5 @@
<?php
-namespace Unit\Doctrine\Search\Listener;
+namespace Doctrine\Tests\Search\Listener;
use Doctrine\ODM\MongoDB\Events;
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
@@ -70,7 +70,7 @@ public function testLoadClassMetadata()
$sm = $this->listener->getSearchManager();
$mdf = $sm->getClassMetadataFactory();
- $this->assertTrue($mdf->hasMetadataFor('Unit\Doctrine\Search\Listener\TestBlogPost'));
+ $this->assertTrue($mdf->hasMetadataFor('Doctrine\Tests\Search\Listener\TestBlogPost'));
}
View
2  ...arch/Mapping/ClassMetadataFactoryTest.php → ...arch/Mapping/ClassMetadataFactoryTest.php
@@ -1,5 +1,5 @@
<?php
-namespace Unit\Doctrine\Search\Mapping;
+namespace Doctrine\Tests\Search\Mapping;
use Doctrine\Search\Mapping\ClassMetadataFactory;
/**
View
6 ...rine/Search/Mapping/ClassMetadataTest.php → ...ests/Search/Mapping/ClassMetadataTest.php
@@ -1,5 +1,5 @@
<?php
-namespace Unit\Doctrine\Search\Mapping;
+namespace Doctrine\Tests\Search\Mapping;
use Doctrine\Search\Mapping\ClassMetadata;
@@ -16,7 +16,7 @@ class ClassMetadataTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- $this->classMetadata = new ClassMetadata('Unit\Doctrine\Search\Documents\BlogPost');
+ $this->classMetadata = new ClassMetadata('Doctrine\Tests\Search\Documents\BlogPost');
}
public function test__sleep()
@@ -59,7 +59,7 @@ public function test__wakeup()
public function testGetName()
{
$this->assertEquals($this->classMetadata->getName(),
- 'Unit\Doctrine\Search\Documents\BlogPost');
+ 'Doctrine\Tests\Search\Documents\BlogPost');
}
public function testGetIdentifier()
View
50 ...h/Mapping/Driver/AnnotationDriverTest.php → ...h/Mapping/Driver/AnnotationDriverTest.php
@@ -44,21 +44,19 @@ public function testLoadMetadataForClass()
{
$this->reader->expects($this->once())
- ->method('getClassAnnotations')
- ->will($this->returnValue(array(0, new TestSearchable2(array()))));
+ ->method('getClassAnnotations')
+ ->will($this->returnValue(array(0, new TestSearchable2(array()))));
$this->reader->expects($this->any())
- ->method('getPropertyAnnotations')
- ->will($this->returnValue(array(0, new TestField(array()))));
+ ->method('getPropertyAnnotations')
+ ->will($this->returnValue(array(0, new TestField(array()))));
+ $classMetadata = new ClassMetadata('Doctrine\Tests\Search\Documents\BlogPost');
-
- $classMetadata = new ClassMetadata('Unit\Doctrine\Search\Documents\BlogPost');
-
- $this->annotationDriver->loadMetadataForClass('Unit\Doctrine\Search\Documents\BlogPost', $classMetadata);
+ $this->annotationDriver->loadMetadataForClass('Doctrine\Tests\Search\Documents\BlogPost', $classMetadata);
$this->assertInstanceOf('Doctrine\Search\Mapping\ClassMetadata', $this->classMetadata);
- $this->assertEquals('Unit\Doctrine\Search\Documents\BlogPost', $classMetadata->getName());
+ $this->assertEquals('Doctrine\Tests\Search\Documents\BlogPost', $classMetadata->getName());
}
@@ -69,18 +67,18 @@ public function testLoadMetadataForClassExtractClassAnnotationsException()
{
$this->reader->expects($this->once())
- ->method('getClassAnnotations')
- ->will($this->returnValue(array()));
+ ->method('getClassAnnotations')
+ ->will($this->returnValue(array()));
$this->reflectionClass->expects($this->once())
- ->method('getProperties')
- ->will($this->returnValue(array()));
+ ->method('getProperties')
+ ->will($this->returnValue(array()));
$this->classMetadata->expects($this->once())
- ->method('getReflectionClass')
- ->will($this->returnValue($this->reflectionClass));
+ ->method('getReflectionClass')
+ ->will($this->returnValue($this->reflectionClass));
- $this->annotationDriver->loadMetadataForClass('Unit\Doctrine\Search\Documents\BlogPost', $this->classMetadata);
+ $this->annotationDriver->loadMetadataForClass('Doctrine\Tests\Search\Documents\BlogPost', $this->classMetadata);
}
/**
@@ -89,10 +87,10 @@ public function testLoadMetadataForClassExtractClassAnnotationsException()
public function testLoadMetadataForReflectionErrorClassNotFound()
{
$this->classMetadata->expects($this->once())
- ->method('getReflectionClass')
- ->will($this->returnValue(false));
+ ->method('getReflectionClass')
+ ->will($this->returnValue(false));
- $this->annotationDriver->loadMetadataForClass(array(), $this->classMetadata);
+ $this->annotationDriver->loadMetadataForClass('NotExistingClass', $this->classMetadata);
}
/**
@@ -101,18 +99,18 @@ public function testLoadMetadataForReflectionErrorClassNotFound()
public function testLoadMetadataForClassAddValuesToMetadata()
{
$this->reflectionClass->expects($this->once())
- ->method('getProperties')
- ->will($this->returnValue(array()));
+ ->method('getProperties')
+ ->will($this->returnValue(array()));
$this->reader->expects($this->once())
- ->method('getClassAnnotations')
- ->will($this->returnValue(array(0, new TestSearchable(array()))));
+ ->method('getClassAnnotations')
+ ->will($this->returnValue(array(0, new TestSearchable(array()))));
$this->classMetadata->expects($this->once())
- ->method('getReflectionClass')
- ->will($this->returnValue($this->reflectionClass));
+ ->method('getReflectionClass')
+ ->will($this->returnValue($this->reflectionClass));
- $this->annotationDriver->loadMetadataForClass('Unit\Doctrine\Search\Documents\BlogPost', $this->classMetadata);
+ $this->annotationDriver->loadMetadataForClass('Doctrine\Tests\Search\Documents\BlogPost', $this->classMetadata);
}
View
6 ...nit/Doctrine/Search/SearchManagerTest.php → ...ctrine/Tests/Search/SearchManagerTest.php
@@ -1,5 +1,5 @@
<?php
-namespace Unit\Doctrine\Search;
+namespace Doctrine\Tests\Search;
use Doctrine\Search\SearchManager;
use Doctrine\Search\Http\Client\BuzzClient;
@@ -105,9 +105,9 @@ public function testLoadClassMetadata()
{
$this->metadataFactory->expects($this->once())
->method('getMetadataFor')
- ->will($this->returnValue(new \Doctrine\Search\Mapping\ClassMetadata('Unit\Doctrine\Search\Documents\BlogPost')));
+ ->will($this->returnValue(new \Doctrine\Search\Mapping\ClassMetadata('Doctrine\Tests\Search\Documents\BlogPost')));
- $metaData = $this->sm->loadClassMetadata('Unit\Doctrine\Search\Documents\BlogPost');
+ $metaData = $this->sm->loadClassMetadata('Doctrine\Tests\Search\Documents\BlogPost');
$this->assertInstanceOf('Doctrine\Common\Persistence\Mapping\ClassMetadata', $metaData);
}
View
2  tests/Unit/Doctrine/Search/VersionTest.php → tests/Doctrine/Tests/Search/VersionTest.php
@@ -1,6 +1,6 @@
<?php
-namespace Unit\Doctrine\Search;
+namespace Doctrine\Tests\Search;
use Doctrine\Search\Version;
class VersionTest extends \PHPUnit_Framework_TestCase {
View
13 tests/Unit/Doctrine/Search/Http/Client/Mocks/FileGetContentsMock.php
@@ -1,13 +0,0 @@
-<?php
-namespace Unit\Doctrine\Search\Http\Client\Mocks;
-
-use Buzz\Client\ClientInterface;
-use Buzz\Message;
-
-class FileGetContentsMock implements ClientInterface
-{
- public function send(Message\Request $request, Message\Response $response)
- {
- throw new \RuntimeException('Just a fake');
- }
-}
View
7 tests/Unit/Doctrine/Search/Solr/Tests/ClientTest.php
@@ -1,7 +0,0 @@
-<?php
-namespace Unit\Doctrine\Search\Solr\Tests;
-
-class ClientTest /* extends \PHPUnit_Framework_TestCase */
-{
-
-}
View
2  tests/bootstrap.php
@@ -2,7 +2,7 @@
$loader = require_once __DIR__.'/../vendor/autoload.php';
-$loader->add('Unit\\Doctrine\\Search', __DIR__);
+$loader->add('Doctrine\\Tests\\Search', __DIR__);
$loader->add('Doctrine\\ODM\\MongoDB\\Tests', __DIR__.'/../vendor/doctrine/mongodb-odm/tests');
// use statements
Something went wrong with that request. Please try again.