44 * @copyright Copyright (C) Ibexa AS. All rights reserved.
55 * @license For full copyright and license information view LICENSE file distributed with this source code.
66 */
7+ declare (strict_types=1 );
78
89namespace Ibexa \Tests \Core \IO ;
910
@@ -90,6 +91,7 @@ public function testCreateBinaryFile(BinaryFileCreateStruct $createStruct): Bina
9091 $ filesize = filesize (__FILE__ );
9192 self ::assertNotFalse ($ filesize );
9293 $ spiBinaryFile ->size = $ filesize ;
94+ $ spiBinaryFile ->mtime = new \DateTime ('now ' );
9395
9496 $ this ->binarydataHandlerMock
9597 ->expects (self ::once ())
@@ -128,6 +130,7 @@ public function testLoadBinaryFile(): BinaryFile
128130 $ spiBinaryFile ->id = $ spiId ;
129131 $ spiBinaryFile ->size = 12345 ;
130132 $ spiBinaryFile ->uri = $ spiId ;
133+ $ spiBinaryFile ->mtime = new \DateTime ('now ' );
131134
132135 $ this ->metadataHandlerMock
133136 ->expects (self ::once ())
@@ -152,6 +155,7 @@ public function testLoadBinaryFileNoMetadataUri(): BinaryFile
152155 $ spiBinaryFile = new SPIBinaryFile ();
153156 $ spiBinaryFile ->id = $ spiId ;
154157 $ spiBinaryFile ->size = 12345 ;
158+ $ spiBinaryFile ->mtime = new \DateTime ('now ' );
155159
156160 $ this ->metadataHandlerMock
157161 ->expects (self ::once ())
@@ -164,7 +168,9 @@ public function testLoadBinaryFileNoMetadataUri(): BinaryFile
164168 $ expectedBinaryFile = new BinaryFile (
165169 [
166170 'id ' => $ id ,
167- 'size ' => 12345 , 'uri ' => $ prefixedId , 'mtime ' => null ,
171+ 'size ' => 12345 ,
172+ 'uri ' => $ prefixedId ,
173+ 'mtime ' => $ spiBinaryFile ->mtime ,
168174 ]
169175 );
170176
@@ -192,6 +198,7 @@ public function testLoadBinaryFileByUri(): BinaryFile
192198 $ spiBinaryFile ->id = $ spiId ;
193199 $ spiBinaryFile ->size = 12345 ;
194200 $ spiBinaryFile ->uri = $ spiId ;
201+ $ spiBinaryFile ->mtime = new \DateTime ('now ' );
195202
196203 $ this ->binarydataHandlerMock
197204 ->expects (self ::once ())
0 commit comments