@@ -377,15 +377,15 @@ public function testMoreStatementsWithAttachments() {
377377 public function testRetrieveStatementWithFileUrlAttachments () {
378378 $ lrs = new RemoteLRS (self ::$ endpoint , self ::$ version , self ::$ username , self ::$ password );
379379 $ attachments = new Attachment ();
380- $ pdfUrl = 'http ://www.adlnet.gov/wp-content/uploads/2013/10/xAPI_v1.0.1-2013-10-01.pdf ' ;
380+ $ attachmentUrl = 'https ://github.com/RusticiSoftware/TinCanPHP/raw/master/tests/files/image.jpg ' ;
381381 // Store Attachments in and retrieve them from the LRS
382382 $ attachments
383- ->setUsageType ('http://adlnet.gov/expapi/activities/media ' )
384- ->setDisplay (['en-US ' => 'Test PDF document ' ])
385- ->setContentType ('application/pdf ' )
386- ->setLength (filesize ('tests/files/attachment.pdf ' ))
387- ->setSha2 (hash_file ('sha256 ' , 'tests/files/attachment.pdf ' )) // hash of the attachment data
388- ->setFileUrl ($ pdfUrl )
383+ ->setUsageType ('http://id.tincanapi.com/attachment/supporting_media ' )
384+ ->setDisplay (['en-US ' => 'Test image attachment ' ])
385+ ->setContentType ('image/jpg ' )
386+ ->setLength (filesize ('tests/files/image.jpg ' ))
387+ ->setSha2 (hash_file ('sha256 ' , 'tests/files/image.jpg ' )) // hash of the attachment data
388+ ->setFileUrl ($ attachmentUrl )
389389 ->setDescription (['en-US ' => 'A test document used in an Attachments object example. ' ]);
390390
391391 // Compose statement for sending to the LRS
@@ -409,7 +409,7 @@ public function testRetrieveStatementWithFileUrlAttachments() {
409409 $ this ->assertInstanceOf ('TinCan\LRSResponse ' , $ statementResponse );
410410 $ this ->assertTrue ($ statementResponse ->success );
411411 $ this ->assertInstanceOf ('TinCan\Statement ' , $ statementResponse ->content );
412- $ this ->assertEquals ($ pdfUrl , $ statementResponse ->content ->getAttachments ()[0 ]->getFileUrl ());
412+ $ this ->assertEquals ($ attachmentUrl , $ statementResponse ->content ->getAttachments ()[0 ]->getFileUrl ());
413413 }
414414
415415 public function testRetrieveStateIds () {
0 commit comments