Skip to content

Commit

Permalink
ES Nested and ES Object type classes marked as not abstract.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindaugas Rukas committed Jan 14, 2015
1 parent c0be9f8 commit efd3e49
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 96 deletions.
2 changes: 1 addition & 1 deletion Document/AbstractCdnObject.php → Document/CdnObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @ES\Object
*/
abstract class AbstractCdnObject
class CdnObject
{
/**
* @var string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @ES\Nested
*/
abstract class AbstractImageNested
class ImageNested
{
/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion Document/Traits/CdnObjectTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Trait used for documents which require CdnObject standard fields.
*
* @deprecated Will be removed in stable version. Use AbstractCdnObject instead.
* @deprecated Will be removed in stable version. Use CdnObject instead.
*/
trait CdnObjectTrait
{
Expand Down
2 changes: 1 addition & 1 deletion Document/Traits/ImagesNestedTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Trait used for documents which require ImagesNested standard fields.
*
* @deprecated Will be removed in stable version. Use AbstractImageNested instead.
* @deprecated Will be removed in stable version. Use ImageNested instead.
*/
trait ImagesNestedTrait
{
Expand Down
2 changes: 1 addition & 1 deletion Document/Traits/UrlObjectTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Trait used for documents which require UrlObject standard fields.
*
* @deprecated Will be removed in stable version. Use AbstractUrlObject instead.
* @deprecated Will be removed in stable version. Use UrlObject instead.
*/
trait UrlObjectTrait
{
Expand Down
2 changes: 1 addition & 1 deletion Document/AbstractUrlObject.php → Document/UrlObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @ES\Object
*/
abstract class AbstractUrlObject
class UrlObject
{
/**
* @var string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Provides tests for category document.
*/
class CategoryDocumentTest extends \PHPUnit_Framework_TestCase
class AbstractCategoryDocumentTest extends \PHPUnit_Framework_TestCase
{
/**
* Provides data for testCategoryDocument().
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Provides tests for content document.
*/
class ContentDocumentTest extends \PHPUnit_Framework_TestCase
class AbstractContentDocumentTest extends \PHPUnit_Framework_TestCase
{
/**
* Provides data for testContentDocument().
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Provides tests for product document.
*/
class ProductDocumentTest extends \PHPUnit_Framework_TestCase
class AbstractProductDocumentTest extends \PHPUnit_Framework_TestCase
{
/**
* Provides data for testProductDocument().
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

namespace ONGR\ContentBundle\Tests\Unit\Document;

use ONGR\ContentBundle\Document\AbstractCdnObject;
use ONGR\ContentBundle\Document\CdnObject;

/**
* Provides tests for cdn object.
*/
class AbstractCdnObjectTest extends \PHPUnit_Framework_TestCase
class CdnObjectTest extends \PHPUnit_Framework_TestCase
{
/**
* Provides data for testCdnObject().
Expand Down Expand Up @@ -50,8 +50,8 @@ public function cdnObjectDataProvider()
*/
public function testCdnObject(array $data)
{
/** @var AbstractCdnObject $cdn */
$cdn = $this->getMock('ONGR\ContentBundle\Document\AbstractCdnObject', null);
/** @var CdnObject $cdn */
$cdn = $this->getMock('ONGR\ContentBundle\Document\CdnObject', null);
$cdn->setCdnUrl($data['cdn_url']);
$this->assertEquals($data['cdn_url'], $cdn->getCdnUrl());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

namespace ONGR\ContentBundle\Tests\Unit\Document;

use ONGR\ContentBundle\Document\AbstractImageNested;
use ONGR\ContentBundle\Document\ImageNested;

/**
* Provides tests for imageNested document.
*/
class AbstractImageNestedTest extends \PHPUnit_Framework_TestCase
class ImageNestedTest extends \PHPUnit_Framework_TestCase
{
/**
* Provides data for testImageNested().
Expand Down Expand Up @@ -54,8 +54,8 @@ public function imageNestedDataProvider()
*/
public function testImageNested(array $data)
{
/** @var AbstractImageNested $imagesNested */
$imagesNested = $this->getMock('ONGR\ContentBundle\Document\AbstractImageNested', null);
/** @var ImageNested $imagesNested */
$imagesNested = $this->getMock('ONGR\ContentBundle\Document\ImageNested', null);
$imagesNested->setUrl($data['url']);
$this->assertEquals($data['url'], $imagesNested->getUrl());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

namespace ONGR\ContentBundle\Tests\Unit\Document;

use ONGR\ContentBundle\Document\AbstractUrlObject;
use ONGR\ContentBundle\Document\UrlObject;

/**
* Provides tests for url object.
*/
class AbstractUrlObjectTest extends \PHPUnit_Framework_TestCase
class UrlObjectTest extends \PHPUnit_Framework_TestCase
{
/**
* Provides data for testUrlObject().
Expand Down Expand Up @@ -52,8 +52,8 @@ public function urlObjectDataProvider()
*/
public function testUrlObject(array $data)
{
/** @var AbstractUrlObject $url */
$url = $this->getMock('ONGR\ContentBundle\Document\AbstractUrlObject', null);
/** @var UrlObject $url */
$url = $this->getMock('ONGR\ContentBundle\Document\UrlObject', null);
$url->setUrl($data['url']);
$this->assertEquals($data['url'], $url->getUrl());

Expand Down
9 changes: 6 additions & 3 deletions Tests/app/fixture/Acme/TestBundle/Document/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
namespace ONGR\ContentBundle\Tests\app\fixture\Acme\TestBundle\Document;

use ONGR\ContentBundle\Document\AbstractCategoryDocument;
use ONGR\ContentBundle\Document\CdnObject;
use ONGR\ContentBundle\Document\ImageNested;
use ONGR\ContentBundle\Document\UrlObject;
use ONGR\ElasticsearchBundle\Annotation as ES;

/**
Expand All @@ -24,21 +27,21 @@ class Category extends AbstractCategoryDocument
/**
* @var UrlObject[]|\Iterator
*
* @ES\Property(name="urls", type="object", objectName="AcmeTestBundle:UrlObject", multiple=true)
* @ES\Property(name="urls", type="object", objectName="ONGRContentBundle:UrlObject", multiple=true)
*/
public $dummyUrls;

/**
* @var CdnObject[]|\Iterator
*
* @ES\Property(name="cdn_urls", type="object", objectName="AcmeTestBundle:CdnObject", multiple=true)
* @ES\Property(name="cdn_urls", type="object", objectName="ONGRContentBundle:CdnObject", multiple=true)
*/
public $dummyCdnUrls;

/**
* @var ImageNested[]|\Iterator
*
* @ES\Property(name="images", type="nested", objectName="AcmeTestBundle:ImageNested", multiple=true)
* @ES\Property(name="images", type="nested", objectName="ONGRContentBundle:ImageNested", multiple=true)
*/
public $dummyImagesNested;
}
24 changes: 0 additions & 24 deletions Tests/app/fixture/Acme/TestBundle/Document/CdnObject.php

This file was deleted.

24 changes: 0 additions & 24 deletions Tests/app/fixture/Acme/TestBundle/Document/ImageNested.php

This file was deleted.

24 changes: 0 additions & 24 deletions Tests/app/fixture/Acme/TestBundle/Document/UrlObject.php

This file was deleted.

0 comments on commit efd3e49

Please sign in to comment.