From f04508a1fa89d07c4b24be9df37f1433d42005c2 Mon Sep 17 00:00:00 2001 From: core23 Date: Sun, 22 Nov 2015 08:52:04 +0100 Subject: [PATCH] Updated cs-fixer --- .php_cs | 15 +++++++++++ Admin/BaseMediaAdmin.php | 2 +- Admin/GalleryAdmin.php | 2 +- Admin/GalleryHasMediaAdmin.php | 2 +- Admin/Manager/DoctrineMongoDBManager.php | 9 +++++++ Admin/Manager/DoctrineORMManager.php | 9 +++++++ Admin/ODM/MediaAdmin.php | 2 +- Admin/ORM/MediaAdmin.php | 2 +- Admin/PHPCR/GalleryAdmin.php | 2 +- Admin/PHPCR/MediaAdmin.php | 2 +- .../BaseGalleryBreadcrumbBlockService.php | 2 +- .../GalleryIndexBreadcrumbBlockService.php | 2 +- .../GalleryViewBreadcrumbBlockService.php | 2 +- .../MediaViewBreadcrumbBlockService.php | 2 +- Block/FeatureMediaBlockService.php | 2 +- Block/GalleryBlockService.php | 2 +- Block/MediaBlockService.php | 2 +- CDN/CDNInterface.php | 2 +- CDN/CloudFront.php | 2 +- CDN/Fallback.php | 2 +- CDN/PantherPortal.php | 2 +- CDN/Server.php | 2 +- Command/AddMassMediaCommand.php | 14 +++++----- Command/AddMediaCommand.php | 14 +++++----- Command/BaseCommand.php | 14 +++++----- Command/MigrateToJsonTypeCommand.php | 2 +- Command/RefreshMetadataCommand.php | 14 +++++----- Command/RemoveThumbsCommand.php | 14 +++++----- Command/SyncThumbsCommand.php | 14 +++++----- Command/UpdateCdnStatusCommand.php | 2 +- Consumer/CreateThumbnailConsumer.php | 2 +- Controller/Api/GalleryController.php | 2 +- Controller/Api/MediaController.php | 2 +- Controller/GalleryAdminController.php | 2 +- Controller/GalleryController.php | 2 +- Controller/MediaAdminController.php | 2 +- Controller/MediaController.php | 2 +- .../Compiler/AddProviderCompilerPass.php | 2 +- .../Compiler/GlobalVariablesCompilerPass.php | 2 +- DependencyInjection/Configuration.php | 2 +- DependencyInjection/SonataMediaExtension.php | 2 +- Document/BaseGallery.php | 2 +- Document/BaseGalleryHasMedia.php | 2 +- Document/BaseMedia.php | 2 +- Document/GalleryManager.php | 2 +- Document/MediaManager.php | 2 +- Entity/BaseGallery.php | 2 +- Entity/BaseGalleryHasMedia.php | 2 +- Entity/BaseMedia.php | 2 +- Entity/GalleryManager.php | 2 +- Entity/MediaManager.php | 2 +- Extra/ApiMediaFile.php | 2 +- Extra/Pixlr.php | 2 +- Filesystem/Local.php | 2 +- Filesystem/Replicate.php | 2 +- .../ProviderDataTransformer.php | 2 +- .../ServiceProviderDataTransformer.php | 2 +- Form/Type/ApiMediaType.php | 2 +- Form/Type/MediaType.php | 2 +- Generator/DefaultGenerator.php | 2 +- Generator/GeneratorInterface.php | 2 +- Generator/ODMGenerator.php | 2 +- Generator/PHPCRGenerator.php | 2 +- Listener/BaseMediaEventSubscriber.php | 2 +- Listener/ODM/MediaEventSubscriber.php | 2 +- Listener/ORM/MediaEventSubscriber.php | 2 +- Listener/PHPCR/MediaEventSubscriber.php | 2 +- Metadata/AmazonMetadataBuilder.php | 2 +- Metadata/MetadataBuilderInterface.php | 2 +- Metadata/NoopMetadataBuilder.php | 2 +- Metadata/ProxyMetadataBuilder.php | 2 +- Model/Gallery.php | 2 +- Model/GalleryHasMedia.php | 2 +- Model/GalleryHasMediaInterface.php | 4 +-- Model/GalleryInterface.php | 4 +-- Model/GalleryManager.php | 2 +- Model/GalleryManagerInterface.php | 2 +- Model/Media.php | 2 +- Model/MediaInterface.php | 2 +- Model/MediaManagerInterface.php | 2 +- PHPCR/BaseGallery.php | 2 +- PHPCR/BaseGalleryHasMedia.php | 2 +- PHPCR/BaseGalleryHasMediaRepository.php | 9 +++++++ PHPCR/BaseGalleryRepository.php | 9 +++++++ PHPCR/BaseMedia.php | 2 +- PHPCR/BaseMediaRepository.php | 9 +++++++ PHPCR/GalleryManager.php | 2 +- PHPCR/MediaManager.php | 2 +- Provider/BaseProvider.php | 2 +- Provider/BaseVideoProvider.php | 2 +- Provider/DailyMotionProvider.php | 2 +- Provider/FileProvider.php | 2 +- Provider/ImageProvider.php | 2 +- Provider/MediaProviderInterface.php | 2 +- Provider/Pool.php | 2 +- Provider/VimeoProvider.php | 2 +- Provider/YouTubeProvider.php | 2 +- Resizer/ResizerInterface.php | 2 +- Resizer/SimpleResizer.php | 2 +- Resizer/SquareResizer.php | 4 +-- Security/DownloadStrategyInterface.php | 2 +- Security/ForbiddenDownloadStrategy.php | 2 +- Security/PublicDownloadStrategy.php | 2 +- Security/RolesDownloadStrategy.php | 2 +- Security/SessionDownloadStrategy.php | 2 +- Serializer/GallerySerializerHandler.php | 2 +- Serializer/MediaSerializerHandler.php | 2 +- SonataMediaBundle.php | 2 +- Templating/Helper/MediaHelper.php | 2 +- Tests/Block/Breadcrumb/BreadcrumbTest.php | 2 +- Tests/CDN/CloudFrontTest.php | 4 +-- Tests/CDN/PantherPortalTest.php | 4 +-- .../Controller/Api/GalleryControllerTest.php | 20 +++++++------- Tests/Controller/Api/MediaControllerTest.php | 18 ++++++------- Tests/Document/Media.php | 2 +- Tests/Document/MediaManagerTest.php | 13 ++++++++-- Tests/Entity/GalleryManagerTest.php | 2 +- Tests/Entity/Media.php | 2 +- Tests/Entity/MediaManagerTest.php | 2 +- Tests/Entity/MediaTest.php | 26 +++++++++---------- Tests/Filesystem/LocalTest.php | 4 +-- Tests/Filesystem/ReplicateTest.php | 8 +++--- .../ProviderDataTransformerTest.php | 8 +++--- Tests/Form/Type/ApiMediaTypeTest.php | 2 +- Tests/Generator/DefaultGeneratorTest.php | 10 +++---- Tests/Generator/PHPCRGeneratorTest.php | 8 +++--- Tests/Metadata/AmazonMetadataBuilderTest.php | 6 ++--- Tests/Metadata/NoopMetadataBuilderTest.php | 4 +-- Tests/Metadata/ProxyMetadataBuilderTest.php | 12 ++++----- Tests/Model/MediaTest.php | 2 +- Tests/PHPCR/Media.php | 2 +- Tests/PHPCR/MediaManagerTest.php | 13 ++++++++-- Tests/Provider/BaseProviderTest.php | 22 ++++++++-------- Tests/Provider/DailyMotionProviderTest.php | 22 ++++++++-------- Tests/Provider/FakeHttpWrapper.php | 2 +- Tests/Provider/FileProviderTest.php | 12 ++++----- Tests/Provider/ImageProviderTest.php | 20 +++++++------- Tests/Provider/PoolTest.php | 2 +- Tests/Provider/VimeoProviderTest.php | 22 ++++++++-------- Tests/Provider/YouTubeProviderTest.php | 22 ++++++++-------- Tests/Provider/phpSapiNameOverride.php | 9 +++++++ Tests/Resizer/SimpleResizerTest.php | 6 ++--- Tests/Resizer/SquareResizerTest.php | 6 ++--- .../ForbiddenDownloadStrategyTest.php | 2 +- Tests/Security/PublicDownloadStrategyTest.php | 2 +- Tests/Security/RolesDownloadStrategyTest.php | 2 +- Tests/Thumbnail/FormatThumbnailTest.php | 2 +- .../Constraints/ValidMediaFormatTest.php | 6 ++--- Tests/Validator/FormatValidatorTest.php | 2 +- Tests/tests/bootstrap.php | 6 ++--- Thumbnail/ConsumerThumbnail.php | 2 +- Thumbnail/FormatThumbnail.php | 2 +- Thumbnail/LiipImagineThumbnail.php | 2 +- Thumbnail/ThumbnailInterface.php | 2 +- Twig/Extension/FormatterMediaExtension.php | 4 +-- Twig/Extension/MediaExtension.php | 4 +-- Twig/GlobalVariables.php | 2 +- Twig/Node/MediaNode.php | 4 +-- Twig/Node/PathNode.php | 4 +-- Twig/Node/ThumbnailNode.php | 4 +-- Twig/TokenParser/MediaTokenParser.php | 4 +-- Twig/TokenParser/PathTokenParser.php | 4 +-- Twig/TokenParser/ThumbnailTokenParser.php | 4 +-- Validator/Constraints/ValidMediaFormat.php | 4 +-- Validator/FormatValidator.php | 4 +-- 165 files changed, 411 insertions(+), 324 deletions(-) diff --git a/.php_cs b/.php_cs index 0b1c7f90e..97198e93a 100644 --- a/.php_cs +++ b/.php_cs @@ -1,18 +1,33 @@ + +For the full copyright and license information, please view the LICENSE +file that was distributed with this source code. +EOF; + +Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header); + $finder = Symfony\CS\Finder\DefaultFinder::create() ->in(array(__DIR__)) + ->exclude(array('Tests/Fixtures')) ; return Symfony\CS\Config\Config::create() ->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL) ->fixers(array( + 'header_comment', '-unalign_double_arrow', '-unalign_equals', 'align_double_arrow', 'newline_after_open_tag', 'ordered_use', 'long_array_syntax', + 'php_unit_construct', + 'php_unit_strict', )) ->setUsingCache(true) ->finder($finder) diff --git a/Admin/BaseMediaAdmin.php b/Admin/BaseMediaAdmin.php index 53b603692..640b21f3f 100644 --- a/Admin/BaseMediaAdmin.php +++ b/Admin/BaseMediaAdmin.php @@ -1,7 +1,7 @@ * diff --git a/Admin/GalleryAdmin.php b/Admin/GalleryAdmin.php index a458a22cb..408193d2a 100644 --- a/Admin/GalleryAdmin.php +++ b/Admin/GalleryAdmin.php @@ -1,7 +1,7 @@ * diff --git a/Admin/GalleryHasMediaAdmin.php b/Admin/GalleryHasMediaAdmin.php index f6beb3f55..cebc74842 100644 --- a/Admin/GalleryHasMediaAdmin.php +++ b/Admin/GalleryHasMediaAdmin.php @@ -1,7 +1,7 @@ * diff --git a/Admin/Manager/DoctrineMongoDBManager.php b/Admin/Manager/DoctrineMongoDBManager.php index a6ff4d25c..00f6a1707 100644 --- a/Admin/Manager/DoctrineMongoDBManager.php +++ b/Admin/Manager/DoctrineMongoDBManager.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Sonata\MediaBundle\Admin\Manager; use Sonata\AdminBundle\Datagrid\ProxyQueryInterface; diff --git a/Admin/Manager/DoctrineORMManager.php b/Admin/Manager/DoctrineORMManager.php index 41d1780ca..d4e4aeb62 100644 --- a/Admin/Manager/DoctrineORMManager.php +++ b/Admin/Manager/DoctrineORMManager.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Sonata\MediaBundle\Admin\Manager; use Doctrine\DBAL\DBALException; diff --git a/Admin/ODM/MediaAdmin.php b/Admin/ODM/MediaAdmin.php index 46621001c..ea0aaca89 100644 --- a/Admin/ODM/MediaAdmin.php +++ b/Admin/ODM/MediaAdmin.php @@ -1,7 +1,7 @@ * diff --git a/Admin/ORM/MediaAdmin.php b/Admin/ORM/MediaAdmin.php index 88e97d8b4..659729383 100644 --- a/Admin/ORM/MediaAdmin.php +++ b/Admin/ORM/MediaAdmin.php @@ -1,7 +1,7 @@ * diff --git a/Admin/PHPCR/GalleryAdmin.php b/Admin/PHPCR/GalleryAdmin.php index 44210f453..7f0a3a27e 100644 --- a/Admin/PHPCR/GalleryAdmin.php +++ b/Admin/PHPCR/GalleryAdmin.php @@ -1,7 +1,7 @@ * diff --git a/Admin/PHPCR/MediaAdmin.php b/Admin/PHPCR/MediaAdmin.php index aa4af0eeb..de563b918 100644 --- a/Admin/PHPCR/MediaAdmin.php +++ b/Admin/PHPCR/MediaAdmin.php @@ -1,7 +1,7 @@ * diff --git a/Block/Breadcrumb/BaseGalleryBreadcrumbBlockService.php b/Block/Breadcrumb/BaseGalleryBreadcrumbBlockService.php index bf35ab9e1..b451ccf93 100644 --- a/Block/Breadcrumb/BaseGalleryBreadcrumbBlockService.php +++ b/Block/Breadcrumb/BaseGalleryBreadcrumbBlockService.php @@ -1,7 +1,7 @@ * diff --git a/Block/Breadcrumb/GalleryIndexBreadcrumbBlockService.php b/Block/Breadcrumb/GalleryIndexBreadcrumbBlockService.php index f509c8ce7..86e791560 100644 --- a/Block/Breadcrumb/GalleryIndexBreadcrumbBlockService.php +++ b/Block/Breadcrumb/GalleryIndexBreadcrumbBlockService.php @@ -1,7 +1,7 @@ * diff --git a/Block/Breadcrumb/GalleryViewBreadcrumbBlockService.php b/Block/Breadcrumb/GalleryViewBreadcrumbBlockService.php index b80c10abc..bd82732e6 100644 --- a/Block/Breadcrumb/GalleryViewBreadcrumbBlockService.php +++ b/Block/Breadcrumb/GalleryViewBreadcrumbBlockService.php @@ -1,7 +1,7 @@ * diff --git a/Block/Breadcrumb/MediaViewBreadcrumbBlockService.php b/Block/Breadcrumb/MediaViewBreadcrumbBlockService.php index 9fe51bd4c..9c1287eb3 100644 --- a/Block/Breadcrumb/MediaViewBreadcrumbBlockService.php +++ b/Block/Breadcrumb/MediaViewBreadcrumbBlockService.php @@ -1,7 +1,7 @@ * diff --git a/Block/FeatureMediaBlockService.php b/Block/FeatureMediaBlockService.php index 2162f8dc7..27c97a3af 100644 --- a/Block/FeatureMediaBlockService.php +++ b/Block/FeatureMediaBlockService.php @@ -1,7 +1,7 @@ * diff --git a/Block/GalleryBlockService.php b/Block/GalleryBlockService.php index 6dfe7ec53..578b75a90 100644 --- a/Block/GalleryBlockService.php +++ b/Block/GalleryBlockService.php @@ -1,7 +1,7 @@ * diff --git a/Block/MediaBlockService.php b/Block/MediaBlockService.php index df9ab255f..36b00d7e4 100644 --- a/Block/MediaBlockService.php +++ b/Block/MediaBlockService.php @@ -1,7 +1,7 @@ * diff --git a/CDN/CDNInterface.php b/CDN/CDNInterface.php index 893f48038..bbcf556eb 100644 --- a/CDN/CDNInterface.php +++ b/CDN/CDNInterface.php @@ -1,7 +1,7 @@ * diff --git a/CDN/CloudFront.php b/CDN/CloudFront.php index 742e28f4b..9186a5d91 100644 --- a/CDN/CloudFront.php +++ b/CDN/CloudFront.php @@ -1,7 +1,7 @@ * diff --git a/CDN/Fallback.php b/CDN/Fallback.php index cfe8430f2..935fe8521 100644 --- a/CDN/Fallback.php +++ b/CDN/Fallback.php @@ -1,7 +1,7 @@ * diff --git a/CDN/PantherPortal.php b/CDN/PantherPortal.php index 7d2c666bd..7489b966e 100644 --- a/CDN/PantherPortal.php +++ b/CDN/PantherPortal.php @@ -1,7 +1,7 @@ * diff --git a/CDN/Server.php b/CDN/Server.php index 15e08ed1a..12fdf9d27 100644 --- a/CDN/Server.php +++ b/CDN/Server.php @@ -1,7 +1,7 @@ * diff --git a/Command/AddMassMediaCommand.php b/Command/AddMassMediaCommand.php index 51f7d4219..d9c971a70 100644 --- a/Command/AddMassMediaCommand.php +++ b/Command/AddMassMediaCommand.php @@ -1,13 +1,13 @@ -* -* For the full copyright and license information, please view the LICENSE -* file that was distributed with this source code. -*/ + * This file is part of the Sonata Project package. + * + * (c) Thomas Rabaix + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ namespace Sonata\MediaBundle\Command; diff --git a/Command/AddMediaCommand.php b/Command/AddMediaCommand.php index 3d111750b..5147ef21b 100644 --- a/Command/AddMediaCommand.php +++ b/Command/AddMediaCommand.php @@ -1,13 +1,13 @@ -* -* For the full copyright and license information, please view the LICENSE -* file that was distributed with this source code. -*/ + * This file is part of the Sonata Project package. + * + * (c) Thomas Rabaix + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ namespace Sonata\MediaBundle\Command; diff --git a/Command/BaseCommand.php b/Command/BaseCommand.php index 1f9790ee0..58776bcf4 100644 --- a/Command/BaseCommand.php +++ b/Command/BaseCommand.php @@ -1,13 +1,13 @@ -* -* For the full copyright and license information, please view the LICENSE -* file that was distributed with this source code. -*/ + * This file is part of the Sonata Project package. + * + * (c) Thomas Rabaix + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ namespace Sonata\MediaBundle\Command; diff --git a/Command/MigrateToJsonTypeCommand.php b/Command/MigrateToJsonTypeCommand.php index ab33299b1..1813d7df1 100644 --- a/Command/MigrateToJsonTypeCommand.php +++ b/Command/MigrateToJsonTypeCommand.php @@ -1,7 +1,7 @@ * diff --git a/Command/RefreshMetadataCommand.php b/Command/RefreshMetadataCommand.php index 5f01f1afe..9aa2faddf 100644 --- a/Command/RefreshMetadataCommand.php +++ b/Command/RefreshMetadataCommand.php @@ -1,13 +1,13 @@ -* -* For the full copyright and license information, please view the LICENSE -* file that was distributed with this source code. -*/ + * This file is part of the Sonata Project package. + * + * (c) Thomas Rabaix + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ namespace Sonata\MediaBundle\Command; diff --git a/Command/RemoveThumbsCommand.php b/Command/RemoveThumbsCommand.php index 6ff0f26a0..d3117d13c 100644 --- a/Command/RemoveThumbsCommand.php +++ b/Command/RemoveThumbsCommand.php @@ -1,13 +1,13 @@ -* -* For the full copyright and license information, please view the LICENSE -* file that was distributed with this source code. -*/ + * This file is part of the Sonata Project package. + * + * (c) Thomas Rabaix + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ namespace Sonata\MediaBundle\Command; diff --git a/Command/SyncThumbsCommand.php b/Command/SyncThumbsCommand.php index 5f24c38dd..1b3e46c4e 100644 --- a/Command/SyncThumbsCommand.php +++ b/Command/SyncThumbsCommand.php @@ -1,13 +1,13 @@ -* -* For the full copyright and license information, please view the LICENSE -* file that was distributed with this source code. -*/ + * This file is part of the Sonata Project package. + * + * (c) Thomas Rabaix + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ namespace Sonata\MediaBundle\Command; diff --git a/Command/UpdateCdnStatusCommand.php b/Command/UpdateCdnStatusCommand.php index 2de6716c7..5f9d52691 100644 --- a/Command/UpdateCdnStatusCommand.php +++ b/Command/UpdateCdnStatusCommand.php @@ -1,7 +1,7 @@ * diff --git a/Consumer/CreateThumbnailConsumer.php b/Consumer/CreateThumbnailConsumer.php index 621cdf690..5f9e44768 100644 --- a/Consumer/CreateThumbnailConsumer.php +++ b/Consumer/CreateThumbnailConsumer.php @@ -1,7 +1,7 @@ * diff --git a/Controller/Api/GalleryController.php b/Controller/Api/GalleryController.php index 4524f000e..4ea4dfbcb 100644 --- a/Controller/Api/GalleryController.php +++ b/Controller/Api/GalleryController.php @@ -1,7 +1,7 @@ * diff --git a/Controller/Api/MediaController.php b/Controller/Api/MediaController.php index 9d7838233..7a4411719 100644 --- a/Controller/Api/MediaController.php +++ b/Controller/Api/MediaController.php @@ -1,7 +1,7 @@ * diff --git a/Controller/GalleryAdminController.php b/Controller/GalleryAdminController.php index 299e7e118..85c86cf6b 100644 --- a/Controller/GalleryAdminController.php +++ b/Controller/GalleryAdminController.php @@ -1,7 +1,7 @@ * diff --git a/Controller/GalleryController.php b/Controller/GalleryController.php index ff9cd4397..77c7daf6d 100644 --- a/Controller/GalleryController.php +++ b/Controller/GalleryController.php @@ -1,7 +1,7 @@ * diff --git a/Controller/MediaAdminController.php b/Controller/MediaAdminController.php index 57c38c5d6..0efdf42ba 100644 --- a/Controller/MediaAdminController.php +++ b/Controller/MediaAdminController.php @@ -1,7 +1,7 @@ * diff --git a/Controller/MediaController.php b/Controller/MediaController.php index 1654f8a83..873483200 100644 --- a/Controller/MediaController.php +++ b/Controller/MediaController.php @@ -1,7 +1,7 @@ * diff --git a/DependencyInjection/Compiler/AddProviderCompilerPass.php b/DependencyInjection/Compiler/AddProviderCompilerPass.php index 7b9da9e23..e9533d8d9 100644 --- a/DependencyInjection/Compiler/AddProviderCompilerPass.php +++ b/DependencyInjection/Compiler/AddProviderCompilerPass.php @@ -1,7 +1,7 @@ * diff --git a/DependencyInjection/Compiler/GlobalVariablesCompilerPass.php b/DependencyInjection/Compiler/GlobalVariablesCompilerPass.php index bf2c4c7e1..1ce56ec47 100644 --- a/DependencyInjection/Compiler/GlobalVariablesCompilerPass.php +++ b/DependencyInjection/Compiler/GlobalVariablesCompilerPass.php @@ -1,7 +1,7 @@ * diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 8cd46c78e..d3afbe767 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -1,7 +1,7 @@ * diff --git a/DependencyInjection/SonataMediaExtension.php b/DependencyInjection/SonataMediaExtension.php index 96dedb3a8..0c07602b0 100644 --- a/DependencyInjection/SonataMediaExtension.php +++ b/DependencyInjection/SonataMediaExtension.php @@ -1,7 +1,7 @@ * diff --git a/Document/BaseGallery.php b/Document/BaseGallery.php index 01afdd23b..e4100ead4 100644 --- a/Document/BaseGallery.php +++ b/Document/BaseGallery.php @@ -1,7 +1,7 @@ * diff --git a/Document/BaseGalleryHasMedia.php b/Document/BaseGalleryHasMedia.php index 36ccbdc43..bb763eb17 100644 --- a/Document/BaseGalleryHasMedia.php +++ b/Document/BaseGalleryHasMedia.php @@ -1,7 +1,7 @@ * diff --git a/Document/BaseMedia.php b/Document/BaseMedia.php index d03f2f987..da6ba7ad9 100644 --- a/Document/BaseMedia.php +++ b/Document/BaseMedia.php @@ -1,7 +1,7 @@ * diff --git a/Document/GalleryManager.php b/Document/GalleryManager.php index 931eb981b..bcd29056a 100644 --- a/Document/GalleryManager.php +++ b/Document/GalleryManager.php @@ -1,7 +1,7 @@ * diff --git a/Document/MediaManager.php b/Document/MediaManager.php index cc9814474..3dc3363d1 100644 --- a/Document/MediaManager.php +++ b/Document/MediaManager.php @@ -1,7 +1,7 @@ * diff --git a/Entity/BaseGallery.php b/Entity/BaseGallery.php index a4c1f5781..2f199d195 100644 --- a/Entity/BaseGallery.php +++ b/Entity/BaseGallery.php @@ -1,7 +1,7 @@ * diff --git a/Entity/BaseGalleryHasMedia.php b/Entity/BaseGalleryHasMedia.php index f522b6929..4f5f6398f 100644 --- a/Entity/BaseGalleryHasMedia.php +++ b/Entity/BaseGalleryHasMedia.php @@ -1,7 +1,7 @@ * diff --git a/Entity/BaseMedia.php b/Entity/BaseMedia.php index 8135b1165..fd0736edb 100644 --- a/Entity/BaseMedia.php +++ b/Entity/BaseMedia.php @@ -1,7 +1,7 @@ * diff --git a/Entity/GalleryManager.php b/Entity/GalleryManager.php index d4b56aa9a..8051e05b7 100644 --- a/Entity/GalleryManager.php +++ b/Entity/GalleryManager.php @@ -1,7 +1,7 @@ * diff --git a/Entity/MediaManager.php b/Entity/MediaManager.php index 36bbc3886..99df22eba 100644 --- a/Entity/MediaManager.php +++ b/Entity/MediaManager.php @@ -1,7 +1,7 @@ * diff --git a/Extra/ApiMediaFile.php b/Extra/ApiMediaFile.php index b341f9a8b..61ccf0fc4 100644 --- a/Extra/ApiMediaFile.php +++ b/Extra/ApiMediaFile.php @@ -1,7 +1,7 @@ * diff --git a/Extra/Pixlr.php b/Extra/Pixlr.php index b6b0d47bd..945ba6473 100644 --- a/Extra/Pixlr.php +++ b/Extra/Pixlr.php @@ -1,7 +1,7 @@ * diff --git a/Filesystem/Local.php b/Filesystem/Local.php index 8a7493544..86c826ba8 100644 --- a/Filesystem/Local.php +++ b/Filesystem/Local.php @@ -1,7 +1,7 @@ * diff --git a/Filesystem/Replicate.php b/Filesystem/Replicate.php index f64dfe41e..7cbc1a453 100644 --- a/Filesystem/Replicate.php +++ b/Filesystem/Replicate.php @@ -1,7 +1,7 @@ * diff --git a/Form/DataTransformer/ProviderDataTransformer.php b/Form/DataTransformer/ProviderDataTransformer.php index f84cb2dd0..233ed6353 100644 --- a/Form/DataTransformer/ProviderDataTransformer.php +++ b/Form/DataTransformer/ProviderDataTransformer.php @@ -1,7 +1,7 @@ * diff --git a/Form/DataTransformer/ServiceProviderDataTransformer.php b/Form/DataTransformer/ServiceProviderDataTransformer.php index 11cb90c45..a460513ed 100644 --- a/Form/DataTransformer/ServiceProviderDataTransformer.php +++ b/Form/DataTransformer/ServiceProviderDataTransformer.php @@ -1,7 +1,7 @@ * diff --git a/Form/Type/ApiMediaType.php b/Form/Type/ApiMediaType.php index 83115e3f0..e42ccb497 100644 --- a/Form/Type/ApiMediaType.php +++ b/Form/Type/ApiMediaType.php @@ -1,7 +1,7 @@ * diff --git a/Form/Type/MediaType.php b/Form/Type/MediaType.php index 53cc9ae49..cb51e0066 100644 --- a/Form/Type/MediaType.php +++ b/Form/Type/MediaType.php @@ -1,7 +1,7 @@ * diff --git a/Generator/DefaultGenerator.php b/Generator/DefaultGenerator.php index 3c9b405c6..8ae4af8de 100644 --- a/Generator/DefaultGenerator.php +++ b/Generator/DefaultGenerator.php @@ -1,7 +1,7 @@ * diff --git a/Generator/GeneratorInterface.php b/Generator/GeneratorInterface.php index 52c845553..0a8d28787 100644 --- a/Generator/GeneratorInterface.php +++ b/Generator/GeneratorInterface.php @@ -1,7 +1,7 @@ * diff --git a/Generator/ODMGenerator.php b/Generator/ODMGenerator.php index 29137682d..416539adc 100644 --- a/Generator/ODMGenerator.php +++ b/Generator/ODMGenerator.php @@ -1,7 +1,7 @@ * diff --git a/Generator/PHPCRGenerator.php b/Generator/PHPCRGenerator.php index 963b0f047..87f5c87c0 100644 --- a/Generator/PHPCRGenerator.php +++ b/Generator/PHPCRGenerator.php @@ -1,7 +1,7 @@ * diff --git a/Listener/BaseMediaEventSubscriber.php b/Listener/BaseMediaEventSubscriber.php index e4de1cade..3d9a25dd5 100644 --- a/Listener/BaseMediaEventSubscriber.php +++ b/Listener/BaseMediaEventSubscriber.php @@ -1,7 +1,7 @@ * diff --git a/Listener/ODM/MediaEventSubscriber.php b/Listener/ODM/MediaEventSubscriber.php index 37713e711..f1a256746 100644 --- a/Listener/ODM/MediaEventSubscriber.php +++ b/Listener/ODM/MediaEventSubscriber.php @@ -1,7 +1,7 @@ * diff --git a/Listener/ORM/MediaEventSubscriber.php b/Listener/ORM/MediaEventSubscriber.php index 7cf250b69..c978ce81e 100644 --- a/Listener/ORM/MediaEventSubscriber.php +++ b/Listener/ORM/MediaEventSubscriber.php @@ -1,7 +1,7 @@ * diff --git a/Listener/PHPCR/MediaEventSubscriber.php b/Listener/PHPCR/MediaEventSubscriber.php index 9d7a14581..6afd51342 100644 --- a/Listener/PHPCR/MediaEventSubscriber.php +++ b/Listener/PHPCR/MediaEventSubscriber.php @@ -1,7 +1,7 @@ * diff --git a/Metadata/AmazonMetadataBuilder.php b/Metadata/AmazonMetadataBuilder.php index 637f1ab44..874de432a 100644 --- a/Metadata/AmazonMetadataBuilder.php +++ b/Metadata/AmazonMetadataBuilder.php @@ -1,7 +1,7 @@ * diff --git a/Metadata/MetadataBuilderInterface.php b/Metadata/MetadataBuilderInterface.php index 8be1b8989..8da8ce845 100644 --- a/Metadata/MetadataBuilderInterface.php +++ b/Metadata/MetadataBuilderInterface.php @@ -1,7 +1,7 @@ * diff --git a/Metadata/NoopMetadataBuilder.php b/Metadata/NoopMetadataBuilder.php index 10653c50d..74460374b 100644 --- a/Metadata/NoopMetadataBuilder.php +++ b/Metadata/NoopMetadataBuilder.php @@ -1,7 +1,7 @@ * diff --git a/Metadata/ProxyMetadataBuilder.php b/Metadata/ProxyMetadataBuilder.php index 9dc0d03e6..d5d78f3e5 100644 --- a/Metadata/ProxyMetadataBuilder.php +++ b/Metadata/ProxyMetadataBuilder.php @@ -1,7 +1,7 @@ * diff --git a/Model/Gallery.php b/Model/Gallery.php index 44009b3cf..01f4b7cf1 100644 --- a/Model/Gallery.php +++ b/Model/Gallery.php @@ -1,7 +1,7 @@ * diff --git a/Model/GalleryHasMedia.php b/Model/GalleryHasMedia.php index 298ab9a78..3b79958dc 100644 --- a/Model/GalleryHasMedia.php +++ b/Model/GalleryHasMedia.php @@ -1,7 +1,7 @@ * diff --git a/Model/GalleryHasMediaInterface.php b/Model/GalleryHasMediaInterface.php index 03729128d..ec268c239 100644 --- a/Model/GalleryHasMediaInterface.php +++ b/Model/GalleryHasMediaInterface.php @@ -1,9 +1,9 @@ + * (c) Thomas Rabaix * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/Model/GalleryInterface.php b/Model/GalleryInterface.php index 1902d1d98..413783c08 100644 --- a/Model/GalleryInterface.php +++ b/Model/GalleryInterface.php @@ -1,9 +1,9 @@ + * (c) Thomas Rabaix * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/Model/GalleryManager.php b/Model/GalleryManager.php index 4b343d380..7c49791c5 100644 --- a/Model/GalleryManager.php +++ b/Model/GalleryManager.php @@ -1,7 +1,7 @@ * diff --git a/Model/GalleryManagerInterface.php b/Model/GalleryManagerInterface.php index 0a6b065a5..d45d5d1f8 100644 --- a/Model/GalleryManagerInterface.php +++ b/Model/GalleryManagerInterface.php @@ -1,7 +1,7 @@ * diff --git a/Model/Media.php b/Model/Media.php index 49114d08a..a7ddc0f89 100644 --- a/Model/Media.php +++ b/Model/Media.php @@ -1,7 +1,7 @@ * diff --git a/Model/MediaInterface.php b/Model/MediaInterface.php index 7faef5d8d..6077d8c17 100644 --- a/Model/MediaInterface.php +++ b/Model/MediaInterface.php @@ -1,7 +1,7 @@ * diff --git a/Model/MediaManagerInterface.php b/Model/MediaManagerInterface.php index 9d45a66ea..4ee88ca80 100644 --- a/Model/MediaManagerInterface.php +++ b/Model/MediaManagerInterface.php @@ -1,7 +1,7 @@ * diff --git a/PHPCR/BaseGallery.php b/PHPCR/BaseGallery.php index f2e122ae5..c89a73097 100644 --- a/PHPCR/BaseGallery.php +++ b/PHPCR/BaseGallery.php @@ -1,7 +1,7 @@ * diff --git a/PHPCR/BaseGalleryHasMedia.php b/PHPCR/BaseGalleryHasMedia.php index 4bb6d7961..2e41f21ac 100644 --- a/PHPCR/BaseGalleryHasMedia.php +++ b/PHPCR/BaseGalleryHasMedia.php @@ -1,7 +1,7 @@ * diff --git a/PHPCR/BaseGalleryHasMediaRepository.php b/PHPCR/BaseGalleryHasMediaRepository.php index abdb7efed..ff73f53a6 100644 --- a/PHPCR/BaseGalleryHasMediaRepository.php +++ b/PHPCR/BaseGalleryHasMediaRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Sonata\MediaBundle\PHPCR; use Doctrine\ODM\PHPCR\DocumentRepository; diff --git a/PHPCR/BaseGalleryRepository.php b/PHPCR/BaseGalleryRepository.php index 69e018982..1e811814e 100644 --- a/PHPCR/BaseGalleryRepository.php +++ b/PHPCR/BaseGalleryRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Sonata\MediaBundle\PHPCR; use Doctrine\ODM\PHPCR\DocumentRepository; diff --git a/PHPCR/BaseMedia.php b/PHPCR/BaseMedia.php index 67a1e340d..56c84d096 100644 --- a/PHPCR/BaseMedia.php +++ b/PHPCR/BaseMedia.php @@ -1,7 +1,7 @@ * diff --git a/PHPCR/BaseMediaRepository.php b/PHPCR/BaseMediaRepository.php index 58a65583e..28297eaaf 100644 --- a/PHPCR/BaseMediaRepository.php +++ b/PHPCR/BaseMediaRepository.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Sonata\MediaBundle\PHPCR; use Doctrine\ODM\PHPCR\DocumentRepository; diff --git a/PHPCR/GalleryManager.php b/PHPCR/GalleryManager.php index 939bff3df..ed38f23cd 100644 --- a/PHPCR/GalleryManager.php +++ b/PHPCR/GalleryManager.php @@ -1,7 +1,7 @@ * diff --git a/PHPCR/MediaManager.php b/PHPCR/MediaManager.php index 01c5b6154..a9fb99241 100644 --- a/PHPCR/MediaManager.php +++ b/PHPCR/MediaManager.php @@ -1,7 +1,7 @@ * diff --git a/Provider/BaseProvider.php b/Provider/BaseProvider.php index ff100a40e..ec55362c7 100644 --- a/Provider/BaseProvider.php +++ b/Provider/BaseProvider.php @@ -1,7 +1,7 @@ * diff --git a/Provider/BaseVideoProvider.php b/Provider/BaseVideoProvider.php index bf75fb8cc..4c3fe07e5 100644 --- a/Provider/BaseVideoProvider.php +++ b/Provider/BaseVideoProvider.php @@ -1,7 +1,7 @@ * diff --git a/Provider/DailyMotionProvider.php b/Provider/DailyMotionProvider.php index 5449b1231..4079e6853 100644 --- a/Provider/DailyMotionProvider.php +++ b/Provider/DailyMotionProvider.php @@ -1,7 +1,7 @@ * diff --git a/Provider/FileProvider.php b/Provider/FileProvider.php index 6275e4eff..acaf71266 100644 --- a/Provider/FileProvider.php +++ b/Provider/FileProvider.php @@ -1,7 +1,7 @@ * diff --git a/Provider/ImageProvider.php b/Provider/ImageProvider.php index 3b6dcc38d..ba3d8accb 100644 --- a/Provider/ImageProvider.php +++ b/Provider/ImageProvider.php @@ -1,7 +1,7 @@ * diff --git a/Provider/MediaProviderInterface.php b/Provider/MediaProviderInterface.php index 1f6fa02ca..86d523f23 100644 --- a/Provider/MediaProviderInterface.php +++ b/Provider/MediaProviderInterface.php @@ -1,7 +1,7 @@ * diff --git a/Provider/Pool.php b/Provider/Pool.php index b1de6e282..1355a052c 100644 --- a/Provider/Pool.php +++ b/Provider/Pool.php @@ -1,7 +1,7 @@ * diff --git a/Provider/VimeoProvider.php b/Provider/VimeoProvider.php index d10258039..e1231e40b 100644 --- a/Provider/VimeoProvider.php +++ b/Provider/VimeoProvider.php @@ -1,7 +1,7 @@ * diff --git a/Provider/YouTubeProvider.php b/Provider/YouTubeProvider.php index 60254f878..508abb402 100644 --- a/Provider/YouTubeProvider.php +++ b/Provider/YouTubeProvider.php @@ -1,7 +1,7 @@ * diff --git a/Resizer/ResizerInterface.php b/Resizer/ResizerInterface.php index 71a9ed787..a1b603cc3 100644 --- a/Resizer/ResizerInterface.php +++ b/Resizer/ResizerInterface.php @@ -1,7 +1,7 @@ * diff --git a/Resizer/SimpleResizer.php b/Resizer/SimpleResizer.php index c62fad248..ebff28756 100644 --- a/Resizer/SimpleResizer.php +++ b/Resizer/SimpleResizer.php @@ -1,7 +1,7 @@ * diff --git a/Resizer/SquareResizer.php b/Resizer/SquareResizer.php index 74d4c3f28..a563d60be 100755 --- a/Resizer/SquareResizer.php +++ b/Resizer/SquareResizer.php @@ -1,9 +1,9 @@ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/Security/DownloadStrategyInterface.php b/Security/DownloadStrategyInterface.php index 22d9693ab..7681b8338 100644 --- a/Security/DownloadStrategyInterface.php +++ b/Security/DownloadStrategyInterface.php @@ -1,7 +1,7 @@ * diff --git a/Security/ForbiddenDownloadStrategy.php b/Security/ForbiddenDownloadStrategy.php index 82bb28e57..544d7402b 100644 --- a/Security/ForbiddenDownloadStrategy.php +++ b/Security/ForbiddenDownloadStrategy.php @@ -1,7 +1,7 @@ * diff --git a/Security/PublicDownloadStrategy.php b/Security/PublicDownloadStrategy.php index ca74590a5..bc50b9f09 100644 --- a/Security/PublicDownloadStrategy.php +++ b/Security/PublicDownloadStrategy.php @@ -1,7 +1,7 @@ * diff --git a/Security/RolesDownloadStrategy.php b/Security/RolesDownloadStrategy.php index 103e7115e..57c4c1932 100644 --- a/Security/RolesDownloadStrategy.php +++ b/Security/RolesDownloadStrategy.php @@ -1,7 +1,7 @@ * diff --git a/Security/SessionDownloadStrategy.php b/Security/SessionDownloadStrategy.php index 8dae75ce6..f79ed4b35 100644 --- a/Security/SessionDownloadStrategy.php +++ b/Security/SessionDownloadStrategy.php @@ -1,7 +1,7 @@ * diff --git a/Serializer/GallerySerializerHandler.php b/Serializer/GallerySerializerHandler.php index abb6bae04..2604d5235 100644 --- a/Serializer/GallerySerializerHandler.php +++ b/Serializer/GallerySerializerHandler.php @@ -1,7 +1,7 @@ * diff --git a/Serializer/MediaSerializerHandler.php b/Serializer/MediaSerializerHandler.php index 4f30007f4..c3046d2d0 100644 --- a/Serializer/MediaSerializerHandler.php +++ b/Serializer/MediaSerializerHandler.php @@ -1,7 +1,7 @@ * diff --git a/SonataMediaBundle.php b/SonataMediaBundle.php index 119465a92..a7c1945f4 100644 --- a/SonataMediaBundle.php +++ b/SonataMediaBundle.php @@ -1,7 +1,7 @@ * diff --git a/Templating/Helper/MediaHelper.php b/Templating/Helper/MediaHelper.php index 52f5411c3..4003b85b2 100644 --- a/Templating/Helper/MediaHelper.php +++ b/Templating/Helper/MediaHelper.php @@ -1,7 +1,7 @@ * diff --git a/Tests/Block/Breadcrumb/BreadcrumbTest.php b/Tests/Block/Breadcrumb/BreadcrumbTest.php index 26d31b34b..f9e3d97cc 100644 --- a/Tests/Block/Breadcrumb/BreadcrumbTest.php +++ b/Tests/Block/Breadcrumb/BreadcrumbTest.php @@ -1,7 +1,7 @@ * diff --git a/Tests/CDN/CloudFrontTest.php b/Tests/CDN/CloudFrontTest.php index ef0b9cd69..1e5ef9ddd 100644 --- a/Tests/CDN/CloudFrontTest.php +++ b/Tests/CDN/CloudFrontTest.php @@ -1,7 +1,7 @@ * @@ -27,7 +27,7 @@ public function testCloudFront() ->getMock(); $cloudFront->setClient($client); - $this->assertEquals('/foo/bar.jpg', $cloudFront->getPath('bar.jpg', true)); + $this->assertSame('/foo/bar.jpg', $cloudFront->getPath('bar.jpg', true)); $path = '/mypath/file.jpg'; diff --git a/Tests/CDN/PantherPortalTest.php b/Tests/CDN/PantherPortalTest.php index 6a2cbb98e..c6c8f049c 100644 --- a/Tests/CDN/PantherPortalTest.php +++ b/Tests/CDN/PantherPortalTest.php @@ -1,7 +1,7 @@ * @@ -23,7 +23,7 @@ public function testPortal() $panther = new PantherPortal('/foo', 'login', 'pass', 42); $panther->setClient($client); - $this->assertEquals('/foo/bar.jpg', $panther->getPath('bar.jpg', true)); + $this->assertSame('/foo/bar.jpg', $panther->getPath('bar.jpg', true)); $path = '/mypath/file.jpg'; diff --git a/Tests/Controller/Api/GalleryControllerTest.php b/Tests/Controller/Api/GalleryControllerTest.php index 15c6dfa8e..c9bb09df4 100644 --- a/Tests/Controller/Api/GalleryControllerTest.php +++ b/Tests/Controller/Api/GalleryControllerTest.php @@ -1,7 +1,7 @@ * @@ -42,7 +42,7 @@ public function testGetGalleriesAction() $params->expects($this->once())->method('all')->will($this->returnValue(array('page' => 1, 'count' => 10, 'orderBy' => array('id' => 'ASC')))); $params->expects($this->exactly(3))->method('get'); - $this->assertEquals(array(), $gController->getGalleriesAction($params)); + $this->assertSame(array(), $gController->getGalleriesAction($params)); } public function testGetGalleryAction() @@ -56,7 +56,7 @@ public function testGetGalleryAction() $gController = new GalleryController($gManager, $mediaManager, $formFactory, 'test'); - $this->assertEquals($gallery, $gController->getGalleryAction(1)); + $this->assertSame($gallery, $gController->getGalleryAction(1)); } /** @@ -92,7 +92,7 @@ public function testGetGalleryGalleryhasmediasAction() $gController = new GalleryController($gManager, $mediaManager, $formFactory, 'test'); - $this->assertEquals(array($galleryHasMedia), $gController->getGalleryGalleryhasmediasAction(1)); + $this->assertSame(array($galleryHasMedia), $gController->getGalleryGalleryhasmediasAction(1)); } public function testGetGalleryMediaAction() @@ -113,7 +113,7 @@ public function testGetGalleryMediaAction() $gController = new GalleryController($gManager, $mediaManager, $formFactory, 'test'); - $this->assertEquals(array($media), $gController->getGalleryMediasAction(1)); + $this->assertSame(array($media), $gController->getGalleryMediasAction(1)); } public function testPostGalleryMediaGalleryhasmediaAction() @@ -147,7 +147,7 @@ public function testPostGalleryMediaGalleryhasmediaAction() $view = $galleryController->postGalleryMediaGalleryhasmediaAction(1, 2, new Request()); $this->assertInstanceOf('FOS\RestBundle\View\View', $view); - $this->assertEquals(200, $view->getStatusCode(), 'Should return 200'); + $this->assertSame(200, $view->getStatusCode(), 'Should return 200'); } public function testPostGalleryMediaGalleryhasmediaInvalidAction() @@ -173,7 +173,7 @@ public function testPostGalleryMediaGalleryhasmediaInvalidAction() $view = $galleryController->postGalleryMediaGalleryhasmediaAction(1, 1, new Request()); $this->assertInstanceOf('FOS\RestBundle\View\View', $view); - $this->assertEquals(400, $view->getStatusCode(), 'Should return 400'); + $this->assertSame(400, $view->getStatusCode(), 'Should return 400'); } public function testPutGalleryMediaGalleryhasmediaAction() @@ -205,7 +205,7 @@ public function testPutGalleryMediaGalleryhasmediaAction() $view = $galleryController->putGalleryMediaGalleryhasmediaAction(1, 1, new Request()); $this->assertInstanceOf('FOS\RestBundle\View\View', $view); - $this->assertEquals(200, $view->getStatusCode(), 'Should return 200'); + $this->assertSame(200, $view->getStatusCode(), 'Should return 200'); } public function testPutGalleryMediaGalleryhasmediaInvalidAction() @@ -260,7 +260,7 @@ public function testDeleteGalleryMediaGalleryhasmediaAction() $galleryController = new GalleryController($galleryManager, $mediaManager, $formFactory, 'Sonata\MediaBundle\Tests\Controller\Api\GalleryTest'); $view = $galleryController->deleteGalleryMediaGalleryhasmediaAction(1, 1); - $this->assertEquals(array('deleted' => true), $view); + $this->assertSame(array('deleted' => true), $view); } public function testDeleteGalleryMediaGalleryhasmediaInvalidAction() @@ -288,6 +288,6 @@ public function testDeleteGalleryMediaGalleryhasmediaInvalidAction() $view = $galleryController->deleteGalleryMediaGalleryhasmediaAction(1, 1); $this->assertInstanceOf('FOS\RestBundle\View\View', $view); - $this->assertEquals(400, $view->getStatusCode(), 'Should return 400'); + $this->assertSame(400, $view->getStatusCode(), 'Should return 400'); } } diff --git a/Tests/Controller/Api/MediaControllerTest.php b/Tests/Controller/Api/MediaControllerTest.php index 47819786e..b7000c12d 100644 --- a/Tests/Controller/Api/MediaControllerTest.php +++ b/Tests/Controller/Api/MediaControllerTest.php @@ -1,7 +1,7 @@ * @@ -35,7 +35,7 @@ public function testGetMediaAction() $params->expects($this->once())->method('all')->will($this->returnValue(array('page' => 1, 'count' => 10, 'orderBy' => array('id' => 'ASC')))); $params->expects($this->exactly(3))->method('get'); - $this->assertEquals(array($media), $mController->getMediaAction($params)); + $this->assertSame(array($media), $mController->getMediaAction($params)); } public function testGetMediumAction() @@ -47,7 +47,7 @@ public function testGetMediumAction() $controller = $this->createMediaController($manager); - $this->assertEquals($media, $controller->getMediumAction(1)); + $this->assertSame($media, $controller->getMediumAction(1)); } /** @@ -77,19 +77,19 @@ public function testGetMediumFormatsAction() $expected = array( 'reference' => array( + 'url' => null, 'properties' => array( 'foo' => 'bar', ), - 'url' => null, ), 'format_name1' => array( + 'url' => null, 'properties' => array( 'foo' => 'bar', ), - 'url' => null, ), ); - $this->assertEquals($expected, $controller->getMediumFormatsAction(1)); + $this->assertSame($expected, $controller->getMediumFormatsAction(1)); } public function testGetMediumBinariesAction() @@ -109,7 +109,7 @@ public function testGetMediumBinariesAction() $controller = $this->createMediaController($manager, $pool); - $this->assertEquals($binaryResponse, $controller->getMediumBinaryAction(1, 'format', new Request())); + $this->assertSame($binaryResponse, $controller->getMediumBinaryAction(1, 'format', new Request())); } public function testDeleteMediumAction() @@ -122,7 +122,7 @@ public function testDeleteMediumAction() $expected = array('deleted' => true); - $this->assertEquals($expected, $controller->deleteMediumAction(1)); + $this->assertSame($expected, $controller->deleteMediumAction(1)); } public function testPutMediumAction() @@ -233,7 +233,7 @@ public function testPutMediumBinaryContentAction() $controller = $this->createMediaController($manager, $pool); - $this->assertEquals($media, $controller->putMediumBinaryContentAction(1, new Request())); + $this->assertSame($media, $controller->putMediumBinaryContentAction(1, new Request())); } protected function createMediaController($manager = null, $pool = null, $factory = null) diff --git a/Tests/Document/Media.php b/Tests/Document/Media.php index 8b16f0323..7a5354f81 100644 --- a/Tests/Document/Media.php +++ b/Tests/Document/Media.php @@ -1,7 +1,7 @@ * diff --git a/Tests/Document/MediaManagerTest.php b/Tests/Document/MediaManagerTest.php index e5cd8db05..fc9e3db48 100644 --- a/Tests/Document/MediaManagerTest.php +++ b/Tests/Document/MediaManagerTest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Sonata\MediaBundle\Tests\Document; use Sonata\MediaBundle\Document\MediaManager; @@ -18,8 +27,8 @@ public function testSave() $media = new Media(); $this->manager->save($media, 'default', 'media.test'); - $this->assertEquals('default', $media->getContext()); - $this->assertEquals('media.test', $media->getProviderName()); + $this->assertSame('default', $media->getContext()); + $this->assertSame('media.test', $media->getProviderName()); $media = new Media(); $this->manager->save($media, true); diff --git a/Tests/Entity/GalleryManagerTest.php b/Tests/Entity/GalleryManagerTest.php index 819c20c58..ee3f5e95a 100644 --- a/Tests/Entity/GalleryManagerTest.php +++ b/Tests/Entity/GalleryManagerTest.php @@ -1,7 +1,7 @@ * diff --git a/Tests/Entity/Media.php b/Tests/Entity/Media.php index 303917146..7a8ea33b3 100644 --- a/Tests/Entity/Media.php +++ b/Tests/Entity/Media.php @@ -1,7 +1,7 @@ * diff --git a/Tests/Entity/MediaManagerTest.php b/Tests/Entity/MediaManagerTest.php index e8419133b..15d50d714 100644 --- a/Tests/Entity/MediaManagerTest.php +++ b/Tests/Entity/MediaManagerTest.php @@ -1,7 +1,7 @@ * diff --git a/Tests/Entity/MediaTest.php b/Tests/Entity/MediaTest.php index ffa67e232..53aa6afaa 100644 --- a/Tests/Entity/MediaTest.php +++ b/Tests/Entity/MediaTest.php @@ -1,7 +1,7 @@ * @@ -19,9 +19,9 @@ public function testMetadata() $media->setProviderMetadata(array('thumbnail_url' => 'http://pasloin.com/thumb.png')); - $this->assertEquals($media->getMetadataValue('thumbnail_url'), 'http://pasloin.com/thumb.png', '::getMetadataValue() return the good value'); - $this->assertEquals($media->getMetadataValue('thumbnail_url1', 'default'), 'default', '::getMetadataValue() return the default'); - $this->assertEquals($media->getMetadataValue('thumbnail_url1'), null, '::getMetadataValue() return the null value'); + $this->assertSame($media->getMetadataValue('thumbnail_url'), 'http://pasloin.com/thumb.png', '::getMetadataValue() return the good value'); + $this->assertSame($media->getMetadataValue('thumbnail_url1', 'default'), 'default', '::getMetadataValue() return the default'); + $this->assertSame($media->getMetadataValue('thumbnail_url1'), null, '::getMetadataValue() return the null value'); } public function testStatusList() @@ -48,19 +48,19 @@ public function testSetGet() $media->setContentType('sonata/media'); $media->setCreatedAt(new \DateTime()); - $this->assertEquals(12, $media->getSize()); - $this->assertEquals('description', $media->getDescription()); + $this->assertSame(12, $media->getSize()); + $this->assertSame('description', $media->getDescription()); $this->assertTrue($media->getEnabled()); - $this->assertEquals('name', $media->getProviderName()); - $this->assertEquals(2, $media->getLength()); - $this->assertEquals('copyleft', $media->getCopyright()); - $this->assertEquals('Thomas', $media->getAuthorName()); + $this->assertSame('name', $media->getProviderName()); + $this->assertSame(2, $media->getLength()); + $this->assertSame('copyleft', $media->getCopyright()); + $this->assertSame('Thomas', $media->getAuthorName()); $this->assertTrue($media->getCdnIsFlushable()); - $this->assertEquals('identifier_123', $media->getCdnFlushIdentifier()); + $this->assertSame('identifier_123', $media->getCdnFlushIdentifier()); $this->assertInstanceOf('DateTime', $media->getCdnFlushAt()); $this->assertInstanceOf('DateTime', $media->getCreatedAt()); - $this->assertEquals('sonata/media', $media->getContentType()); - $this->assertEquals('MediaBundle', (string) $media); + $this->assertSame('sonata/media', $media->getContentType()); + $this->assertSame('MediaBundle', (string) $media); $this->assertNull($media->getMetadataValue('foo')); } diff --git a/Tests/Filesystem/LocalTest.php b/Tests/Filesystem/LocalTest.php index a4078bf1f..8a80a384c 100644 --- a/Tests/Filesystem/LocalTest.php +++ b/Tests/Filesystem/LocalTest.php @@ -1,7 +1,7 @@ * @@ -22,6 +22,6 @@ public function testReplicate() // check if OS is Mac OS X where /tmp is a symlink to /private/tmp $result = php_uname('s') == 'Darwin' ? '/private/tmp' : '/tmp'; - $this->assertEquals($result, $local->getDirectory()); + $this->assertSame($result, $local->getDirectory()); } } diff --git a/Tests/Filesystem/ReplicateTest.php b/Tests/Filesystem/ReplicateTest.php index ed0a2732d..805e483d4 100644 --- a/Tests/Filesystem/ReplicateTest.php +++ b/Tests/Filesystem/ReplicateTest.php @@ -1,7 +1,7 @@ * @@ -23,7 +23,7 @@ public function testReplicate() $master->expects($this->once())->method('mtime')->will($this->returnValue('master')); $slave->expects($this->never())->method('mtime'); - $this->assertEquals('master', $replicate->mtime('foo')); + $this->assertSame('master', $replicate->mtime('foo')); $master->expects($this->once())->method('delete')->will($this->returnValue('master')); $slave->expects($this->once())->method('delete')->will($this->returnValue('master')); @@ -39,11 +39,11 @@ public function testReplicate() $master->expects($this->once())->method('write')->will($this->returnValue(123)); $slave->expects($this->once())->method('write')->will($this->returnValue(123)); - $this->assertEquals(123, $replicate->write('foo', 'contents')); + $this->assertSame(true, $replicate->write('foo', 'contents')); $master->expects($this->once())->method('read')->will($this->returnValue('master content')); $slave->expects($this->never())->method('read'); - $this->assertEquals('master content', $replicate->read('foo')); + $this->assertSame('master content', $replicate->read('foo')); $master->expects($this->once())->method('rename'); $slave->expects($this->once())->method('rename'); diff --git a/Tests/Form/DataTransformer/ProviderDataTransformerTest.php b/Tests/Form/DataTransformer/ProviderDataTransformerTest.php index 4f5f5cb31..8e814ec5e 100644 --- a/Tests/Form/DataTransformer/ProviderDataTransformerTest.php +++ b/Tests/Form/DataTransformer/ProviderDataTransformerTest.php @@ -1,7 +1,7 @@ * @@ -23,7 +23,7 @@ public function testReverseTransformFakeValue() $pool = $this->getMockBuilder('Sonata\MediaBundle\Provider\Pool')->disableOriginalConstructor()->getMock(); $transformer = new ProviderDataTransformer($pool, 'stdClass'); - $this->assertEquals('foo', $transformer->reverseTransform('foo')); + $this->assertSame('foo', $transformer->reverseTransform('foo')); } /** @@ -81,7 +81,7 @@ public function testReverseTransformWithNewMediaAndNoBinaryContent() 'new_on_update' => false, 'empty_on_new' => false, )); - $this->assertEquals($media, $transformer->reverseTransform($media)); + $this->assertSame($media, $transformer->reverseTransform($media)); } public function testReverseTransformWithMediaAndNoBinaryContent() @@ -96,7 +96,7 @@ public function testReverseTransformWithMediaAndNoBinaryContent() $media->expects($this->any())->method('getBinaryContent')->will($this->returnValue(null)); $transformer = new ProviderDataTransformer($pool, 'stdClass'); - $this->assertEquals($media, $transformer->reverseTransform($media)); + $this->assertSame($media, $transformer->reverseTransform($media)); } public function testReverseTransformWithMediaAndUploadFileInstance() diff --git a/Tests/Form/Type/ApiMediaTypeTest.php b/Tests/Form/Type/ApiMediaTypeTest.php index eb8e7d87f..48fded716 100644 --- a/Tests/Form/Type/ApiMediaTypeTest.php +++ b/Tests/Form/Type/ApiMediaTypeTest.php @@ -1,7 +1,7 @@ * diff --git a/Tests/Generator/DefaultGeneratorTest.php b/Tests/Generator/DefaultGeneratorTest.php index d7c540359..72e68df45 100644 --- a/Tests/Generator/DefaultGeneratorTest.php +++ b/Tests/Generator/DefaultGeneratorTest.php @@ -1,7 +1,7 @@ * @@ -24,15 +24,15 @@ public function testProvider() $media->setContext('user'); $media->setId(10); - $this->assertEquals('user/0001/01', $generator->generatePath($media)); + $this->assertSame('user/0001/01', $generator->generatePath($media)); $media->setId(10000); - $this->assertEquals('user/0001/11', $generator->generatePath($media)); + $this->assertSame('user/0001/11', $generator->generatePath($media)); $media->setId(12341230); - $this->assertEquals('user/0124/42', $generator->generatePath($media)); + $this->assertSame('user/0124/42', $generator->generatePath($media)); $media->setId(999999999); - $this->assertEquals('user/10000/100', $generator->generatePath($media)); + $this->assertSame('user/10000/100', $generator->generatePath($media)); } } diff --git a/Tests/Generator/PHPCRGeneratorTest.php b/Tests/Generator/PHPCRGeneratorTest.php index f9705dd29..f6eeaaf68 100644 --- a/Tests/Generator/PHPCRGeneratorTest.php +++ b/Tests/Generator/PHPCRGeneratorTest.php @@ -1,7 +1,7 @@ * @@ -24,12 +24,12 @@ public function testPHPCRGenerator() $media->setContext('user'); $media->setId('nodename'); - $this->assertEquals('user', $generator->generatePath($media)); + $this->assertSame('user', $generator->generatePath($media)); $media->setId('/media/nodename'); - $this->assertEquals('user/media', $generator->generatePath($media)); + $this->assertSame('user/media', $generator->generatePath($media)); $media->setId('/media/sub/path/nodename'); - $this->assertEquals('user/media/sub/path', $generator->generatePath($media)); + $this->assertSame('user/media/sub/path', $generator->generatePath($media)); } } diff --git a/Tests/Metadata/AmazonMetadataBuilderTest.php b/Tests/Metadata/AmazonMetadataBuilderTest.php index 4061c3f41..3c1fbfe4b 100644 --- a/Tests/Metadata/AmazonMetadataBuilderTest.php +++ b/Tests/Metadata/AmazonMetadataBuilderTest.php @@ -1,7 +1,7 @@ * @@ -32,7 +32,7 @@ public function testAmazon() foreach ($this->provider() as $provider) { list($a, $b) = $provider; $amazonmetadatabuilder = new AmazonMetadataBuilder($a); - $this->assertEquals($b, $amazonmetadatabuilder->get($media, $filename)); + $this->assertSame($b, $amazonmetadatabuilder->get($media, $filename)); } } @@ -53,7 +53,7 @@ public function provider() array(array('cache_control' => 'max-age=86400'), array('CacheControl' => 'max-age=86400', 'contentType' => 'image/png')), array(array('encryption' => 'aes256'), array('encryption' => 'AES256', 'contentType' => 'image/png')), array(array('meta' => array('key' => 'value')), array('meta' => array('key' => 'value'), 'contentType' => 'image/png')), - array(array('acl' => 'public', 'storage' => 'standard', 'cache_control' => 'max-age=86400', 'encryption' => 'aes256', 'meta' => array('key' => 'value')), array('ACL' => CannedAcl::PUBLIC_READ, 'contentType' => 'image/png', 'storage' => Storage::STANDARD, 'CacheControl' => 'max-age=86400', 'encryption' => 'AES256', 'meta' => array('key' => 'value'))), + array(array('acl' => 'public', 'storage' => 'standard', 'cache_control' => 'max-age=86400', 'encryption' => 'aes256', 'meta' => array('key' => 'value')), array('ACL' => CannedAcl::PUBLIC_READ, 'storage' => Storage::STANDARD, 'meta' => array('key' => 'value'), 'CacheControl' => 'max-age=86400', 'encryption' => 'AES256', 'contentType' => 'image/png')), ); } } diff --git a/Tests/Metadata/NoopMetadataBuilderTest.php b/Tests/Metadata/NoopMetadataBuilderTest.php index 0a7f80fbb..196c33fe0 100644 --- a/Tests/Metadata/NoopMetadataBuilderTest.php +++ b/Tests/Metadata/NoopMetadataBuilderTest.php @@ -1,7 +1,7 @@ * @@ -22,6 +22,6 @@ public function testNoop() $noopmetadatabuilder = new NoopMetadataBuilder(); - $this->assertEquals(array(), $noopmetadatabuilder->get($media, $filename)); + $this->assertSame(array(), $noopmetadatabuilder->get($media, $filename)); } } diff --git a/Tests/Metadata/ProxyMetadataBuilderTest.php b/Tests/Metadata/ProxyMetadataBuilderTest.php index 5e533970d..0df15d982 100644 --- a/Tests/Metadata/ProxyMetadataBuilderTest.php +++ b/Tests/Metadata/ProxyMetadataBuilderTest.php @@ -1,7 +1,7 @@ * @@ -63,7 +63,7 @@ public function testProxyAmazon() $proxymetadatabuilder = new ProxyMetadataBuilder($container, array()); - $this->assertEquals(array('key' => 'amazon'), $proxymetadatabuilder->get($media, $filename)); + $this->assertSame(array('key' => 'amazon'), $proxymetadatabuilder->get($media, $filename)); } public function testProxyLocal() @@ -102,7 +102,7 @@ public function testProxyLocal() $proxymetadatabuilder = new ProxyMetadataBuilder($container, array()); - $this->assertEquals(array('key' => 'noop'), $proxymetadatabuilder->get($media, $filename)); + $this->assertSame(array('key' => 'noop'), $proxymetadatabuilder->get($media, $filename)); } public function testProxyNoProvider() @@ -141,7 +141,7 @@ public function testProxyNoProvider() $proxymetadatabuilder = new ProxyMetadataBuilder($container, array()); - $this->assertEquals(array(), $proxymetadatabuilder->get($media, $filename)); + $this->assertSame(array(), $proxymetadatabuilder->get($media, $filename)); } public function testProxyReplicateWithAmazon() @@ -183,7 +183,7 @@ public function testProxyReplicateWithAmazon() $proxymetadatabuilder = new ProxyMetadataBuilder($container, array()); - $this->assertEquals(array('key' => 'amazon'), $proxymetadatabuilder->get($media, $filename)); + $this->assertSame(array('key' => 'amazon'), $proxymetadatabuilder->get($media, $filename)); } public function testProxyReplicateWithoutAmazon() @@ -224,7 +224,7 @@ public function testProxyReplicateWithoutAmazon() $proxymetadatabuilder = new ProxyMetadataBuilder($container, array()); - $this->assertEquals(array('key' => 'noop'), $proxymetadatabuilder->get($media, $filename)); + $this->assertSame(array('key' => 'noop'), $proxymetadatabuilder->get($media, $filename)); } /** diff --git a/Tests/Model/MediaTest.php b/Tests/Model/MediaTest.php index 4607cd3c5..249fc76d0 100644 --- a/Tests/Model/MediaTest.php +++ b/Tests/Model/MediaTest.php @@ -1,7 +1,7 @@ * diff --git a/Tests/PHPCR/Media.php b/Tests/PHPCR/Media.php index de937f774..0a51d9880 100644 --- a/Tests/PHPCR/Media.php +++ b/Tests/PHPCR/Media.php @@ -1,7 +1,7 @@ * diff --git a/Tests/PHPCR/MediaManagerTest.php b/Tests/PHPCR/MediaManagerTest.php index 778cb9567..4047c9f03 100644 --- a/Tests/PHPCR/MediaManagerTest.php +++ b/Tests/PHPCR/MediaManagerTest.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Sonata\MediaBundle\Tests\PHPCR; use Sonata\MediaBundle\PHPCR\MediaManager; @@ -18,8 +27,8 @@ public function testSave() $media = new Media(); $this->manager->save($media, 'default', 'media.test'); - $this->assertEquals('default', $media->getContext()); - $this->assertEquals('media.test', $media->getProviderName()); + $this->assertSame('default', $media->getContext()); + $this->assertSame('media.test', $media->getProviderName()); $media = new Media(); $this->manager->save($media, true); diff --git a/Tests/Provider/BaseProviderTest.php b/Tests/Provider/BaseProviderTest.php index 91d241723..fcf3c654f 100644 --- a/Tests/Provider/BaseProviderTest.php +++ b/Tests/Provider/BaseProviderTest.php @@ -1,7 +1,7 @@ * @@ -51,7 +51,7 @@ public function testBaseProvider() )); $this->assertInternalType('array', $provider->getTemplates()); - $this->assertEquals('edit.twig', $provider->getTemplate('edit')); + $this->assertSame('edit.twig', $provider->getTemplate('edit')); $this->assertInstanceOf('\Sonata\MediaBundle\CDN\CDNInterface', $provider->getCdn()); @@ -62,27 +62,27 @@ public function testBaseProvider() $media = new \Sonata\MediaBundle\Tests\Entity\Media(); $media->setContext('test'); - $this->assertEquals('admin', $provider->getFormatName($media, 'admin')); - $this->assertEquals('reference', $provider->getFormatName($media, 'reference')); - $this->assertEquals('test_small', $provider->getFormatName($media, 'small')); - $this->assertEquals('test_small', $provider->getFormatName($media, 'test_small')); + $this->assertSame('admin', $provider->getFormatName($media, 'admin')); + $this->assertSame('reference', $provider->getFormatName($media, 'reference')); + $this->assertSame('test_small', $provider->getFormatName($media, 'small')); + $this->assertSame('test_small', $provider->getFormatName($media, 'test_small')); } public function testGetCdnPath() { $provider = $this->getProvider(); - $this->assertEquals('/uploads/media/my_file.txt', $provider->getCdnPath('my_file.txt', false)); + $this->assertSame('/uploads/media/my_file.txt', $provider->getCdnPath('my_file.txt', false)); } public function testMetadata() { $provider = $this->getProvider(); - $this->assertEquals('test', $provider->getProviderMetadata()->getTitle()); - $this->assertEquals('test.description', $provider->getProviderMetadata()->getDescription()); + $this->assertSame('test', $provider->getProviderMetadata()->getTitle()); + $this->assertSame('test.description', $provider->getProviderMetadata()->getDescription()); $this->assertFalse($provider->getProviderMetadata()->getImage()); - $this->assertEquals('fa fa-file', $provider->getProviderMetadata()->getOption('class')); - $this->assertEquals('SonataMediaBundle', $provider->getProviderMetadata()->getDomain()); + $this->assertSame('fa fa-file', $provider->getProviderMetadata()->getOption('class')); + $this->assertSame('SonataMediaBundle', $provider->getProviderMetadata()->getDomain()); } } diff --git a/Tests/Provider/DailyMotionProviderTest.php b/Tests/Provider/DailyMotionProviderTest.php index 443f03042..53dd29822 100644 --- a/Tests/Provider/DailyMotionProviderTest.php +++ b/Tests/Provider/DailyMotionProviderTest.php @@ -1,7 +1,7 @@ * @@ -61,12 +61,12 @@ public function testProvider() $media->setContext('default'); $media->setProviderMetadata(json_decode('{"type":"video","version":"1.0","provider_name":"Dailymotion","provider_url":"http:\/\/www.dailymotion.com","title":"Thomas Rabaix - les tests fonctionnels - Symfony Live 2009","author_name":"Guillaume Pon\u00e7on","author_url":"http:\/\/www.dailymotion.com\/phptv","width":480,"height":270,"html":"