Skip to content

Commit ba08459

Browse files
committed
Removed extra file from attachment tests
1 parent 2d4ec21 commit ba08459

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

phpunit.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
convertWarningsToExceptions="true"
1010
processIsolation="false"
1111
stopOnFailure="false"
12+
syntaxCheck="false"
1213
>
1314
<testsuites>
1415
<testsuite name="TinCanPHP Test Suite">

tests/RemoteLRSTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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() {

tests/files/attachment.pdf

-1.71 MB
Binary file not shown.

0 commit comments

Comments
 (0)