Skip to content

Commit

Permalink
add some missing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TomK committed Jan 13, 2015
1 parent a87485d commit ea7c143
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/AssetResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,20 @@ public function testResponse()
public function testCustomType()
{
$exts = \Packaged\Dispatch\AssetResponse::getExtensions();
$this->assertFalse(array_search('mock',$exts));
$this->assertFalse(array_search('mock', $exts));

$builder = new \Packaged\Dispatch\AssetResponse();
$this->assertInstanceOf(
'\Packaged\Dispatch\Assets\UnknownAsset',
$builder->assetByExtension('mock')
);
\Packaged\Dispatch\AssetResponse::addAssetType('mock', new MockAssetType());
$this->assertInstanceOf(
'\MockAssetType',
$builder->assetByExtension('mock')
);

$asset = $builder->assetByExtension('mock');
$this->assertInstanceOf('\MockAssetType', $asset);

$this->assertEquals('mock', $asset->getExtension());
$this->assertEquals('mock/asset', $asset->getContentType());
}
}

Expand Down

0 comments on commit ea7c143

Please sign in to comment.