mirror of
https://github.com/getgrav/grav.git
synced 2026-03-21 12:01:36 +01:00
✅ Test Assets::getCollections()
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user