N°2435.1 Portal: Split portal composer.json in 2

- Autoloader for portal files in the itop-portal-base module
- Dependencies moved to root composer.json
- Add autoloader for /core and /application content
This commit is contained in:
Molkobain
2019-08-13 10:34:22 +02:00
parent ca92316e7d
commit 5960dc6245
4130 changed files with 331975 additions and 4367 deletions

View File

@@ -0,0 +1,45 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\Templating\Helper\AssetsHelper;
use Symfony\Component\Asset\Package;
use Symfony\Component\Asset\Packages;
use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy;
class AssetsHelperTest extends TestCase
{
private $helper;
protected function setUp()
{
$fooPackage = new Package(new StaticVersionStrategy('42', '%s?v=%s'));
$barPackage = new Package(new StaticVersionStrategy('22', '%s?%s'));
$packages = new Packages($fooPackage, ['bar' => $barPackage]);
$this->helper = new AssetsHelper($packages);
}
public function testGetUrl()
{
$this->assertEquals('me.png?v=42', $this->helper->getUrl('me.png'));
$this->assertEquals('me.png?22', $this->helper->getUrl('me.png', 'bar'));
}
public function testGetVersion()
{
$this->assertEquals('42', $this->helper->getVersion('/'));
$this->assertEquals('22', $this->helper->getVersion('/', 'bar'));
}
}