Skip to content
This repository has been archived by the owner on Aug 1, 2019. It is now read-only.

Commit

Permalink
III-1732 Use MIMEType constructor instead of String fromNative which …
Browse files Browse the repository at this point in the history
…gives types conflict.
  • Loading branch information
Luc Wollants committed Jan 13, 2017
1 parent 11cc151 commit 1316a7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions test/Media/ImageCollectionFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use CultuurNet\UDB3\Media\Properties\Description;
use CultuurNet\UDB3\Media\Properties\MIMEType;
use ValueObjects\Identity\UUID;
use ValueObjects\String\String as StringLiteral;
use ValueObjects\Web\Url;

class ImageCollectionFactoryTest extends \PHPUnit_Framework_TestCase
Expand All @@ -23,14 +22,14 @@ public function it_should_return_a_collection_of_images_from_udb2_media()
{
$photo = new Image(
UUID::fromNative('84c4ddea-a00d-5241-bb1a-f4c01cef0a76'),
MIMEType::fromNative('image/jpeg'),
new MIMEType('image/jpeg'),
new Description('¯\_(ツ)_/¯'),
new CopyrightHolder('Zelf gemaakt'),
Url::fromNative('http://85.255.197.172/images/20140108/9554d6f6-bed1-4303-8d42-3fcec4601e0e.jpg')
);
$imageweb = new Image(
UUID::fromNative('96d1d210-9804-55a4-a2c5-6245031a1d4a'),
MIMEType::fromNative('application/octet-stream'),
new MIMEType('application/octet-stream'),
new Description('¯\_(ツ)_/¯'),
new CopyrightHolder('KWB'),
Url::fromNative('http://testfilm.uitdatabank.be/images/20160531/kwbeensgezind.jpg')
Expand Down
5 changes: 2 additions & 3 deletions test/Media/MediaImporterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use CultuurNet\UDB3\Media\Properties\Description;
use CultuurNet\UDB3\Media\Properties\MIMEType;
use ValueObjects\Identity\UUID;
use ValueObjects\String\String as StringLiteral;
use ValueObjects\Web\Url;

class MediaImporterTest extends \PHPUnit_Framework_TestCase
Expand Down Expand Up @@ -55,7 +54,7 @@ public function it_should_create_media_objects_from_event_media_when_importing_f
->willReturn(ImageCollection::fromArray([
new Image(
UUID::fromNative('f26433f0-97ef-5c07-8ea9-ef00a64dcb59'),
MIMEType::fromNative('image/jpeg'),
new MIMEType('image/jpeg'),
new Description('no description'),
new CopyrightHolder('Zelf gemaakt'),
Url::fromNative('http://85.255.197.172/images/20140108/9554d6f6-bed1-4303-8d42-3fcec4601e0e.jpg')
Expand All @@ -67,7 +66,7 @@ public function it_should_create_media_objects_from_event_media_when_importing_f
->method('create')
->with(
UUID::fromNative('f26433f0-97ef-5c07-8ea9-ef00a64dcb59'),
MIMEType::fromNative('image/jpeg'),
new MIMEType('image/jpeg'),
new Description('no description'),
new CopyrightHolder('Zelf gemaakt'),
Url::fromNative('http://85.255.197.172/images/20140108/9554d6f6-bed1-4303-8d42-3fcec4601e0e.jpg')
Expand Down

0 comments on commit 1316a7b

Please sign in to comment.