Test Assets::getCollections()

This commit is contained in:
Flavio Copes
2016-01-27 10:24:47 +01:00
parent c3c7c78e46
commit 74fdca79f0

View File

@@ -330,6 +330,16 @@ class AssetsTest extends \Codeception\TestCase\Test
$assets->addInlineJs('alert("test")');
$js = $assets->js();
$this->assertSame($js, PHP_EOL. '<script>' .PHP_EOL . 'alert("test")' . PHP_EOL.PHP_EOL .'</script>' . PHP_EOL);
public function testGetCollections()
{
$assets = $this->assets();
$this->assertTrue(is_array($assets->getCollections()));
$this->assertTrue(in_array('jquery', array_keys($assets->getCollections())));
$this->assertTrue(in_array('system://assets/jquery/jquery-2.x.min.js', $assets->getCollections()));
}
}
}