Skip to content

Commit

Permalink
Merge pull request #26 from basz/default-mime-type
Browse files Browse the repository at this point in the history
default mime type
  • Loading branch information
harikt committed Oct 23, 2017
2 parents 74dd06f + f7cca5b commit 767d0d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/AssetService.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,7 @@ protected function getType($path)
if (isset($this->types[$ext])) {
return $this->types[$ext];
}

return 'application/octet-stream';
}
}
4 changes: 2 additions & 2 deletions tests/src/AssetServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function testGetAsset_noVendorPackage()
{
$asset = $this->service->getAsset('no-vendor', 'no-package', 'style.css');
$this->assertNull($asset->path);
$this->assertNull($asset->type);
$this->assertEquals('application/octet-stream', $asset->type);
}

public function testGetAsset_noType()
Expand All @@ -41,6 +41,6 @@ public function testGetAsset_noType()
$expect = $this->asset_dir . DIRECTORY_SEPARATOR . 'fake.txt';
$this->assertSame($expect, $asset->path);

$this->assertNull($asset->type);
$this->assertEquals('application/octet-stream', $asset->type);
}
}

0 comments on commit 767d0d6

Please sign in to comment.