mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
composer.json - move tests-related classes to "autoload-dev" section (used for development purposes only and avoid polluting the autoloader in production)
This commit is contained in:
45
tests/Utilities/BundleTest.php
Normal file
45
tests/Utilities/BundleTest.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* (c) Meritoo.pl, http://www.meritoo.pl
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Meritoo\Common\Test\Utilities;
|
||||
|
||||
use Meritoo\Common\Test\Base\BaseTestCase;
|
||||
use Meritoo\Common\Utilities\Bundle;
|
||||
|
||||
/**
|
||||
* Test case of the useful methods for bundle
|
||||
*
|
||||
* @author Krzysztof Niziol <krzysztof.niziol@meritoo.pl>
|
||||
* @copyright Meritoo.pl
|
||||
*/
|
||||
class BundleTest extends BaseTestCase
|
||||
{
|
||||
public function verifyConstructor()
|
||||
{
|
||||
static::assertHasNoConstructor(Bundle::class);
|
||||
}
|
||||
|
||||
public function testGetBundleViewPathEmptyPathAndBundle()
|
||||
{
|
||||
self::assertNull(Bundle::getBundleViewPath('', ''));
|
||||
self::assertNull(Bundle::getBundleViewPath('test', ''));
|
||||
self::assertNull(Bundle::getBundleViewPath('', 'test'));
|
||||
}
|
||||
|
||||
public function testGetBundleViewPathWithDefaultExtension()
|
||||
{
|
||||
self::assertEquals('Lorem:Ipsum.html.twig', Bundle::getBundleViewPath('Ipsum', 'Lorem'));
|
||||
self::assertEquals('LobortisTincidunt:FusceElementum.html.twig', Bundle::getBundleViewPath('FusceElementum', 'LobortisTincidunt'));
|
||||
}
|
||||
|
||||
public function testGetBundleViewPathWithCustomExtension()
|
||||
{
|
||||
self::assertNull(Bundle::getBundleViewPath('Ipsum', 'Lorem', ''));
|
||||
self::assertEquals('Lorem:Ipsum.js.twig', Bundle::getBundleViewPath('Ipsum', 'Lorem', 'js.twig'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user