for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
* @copyright Aimeos (aimeos.org), 2021
*/
namespace Aimeos\MShop\Rule\Manager;
* Test class for \Aimeos\MShop\Rule\Manager\Factory.
class FactoryTest extends \PHPUnit\Framework\TestCase
{
public function testCreateManager()
$manager = \Aimeos\MShop\Rule\Manager\Factory::create( \TestHelperMShop::getContext() );
$this->assertInstanceOf( \Aimeos\MShop\Common\Manager\Iface::class, $manager );
}
public function testCreateManagerName()
$manager = \Aimeos\MShop\Rule\Manager\Factory::create( \TestHelperMShop::getContext(), 'Standard' );
public function testCreateManagerInvalidName()
$this->expectException( \Aimeos\MShop\Rule\Exception::class );
\Aimeos\MShop\Rule\Manager\Factory::create( \TestHelperMShop::getContext(), '%$@' );
public function testCreateManagerNotExisting()
$this->expectException( \Aimeos\MShop\Exception::class );
\Aimeos\MShop\Rule\Manager\Factory::create( \TestHelperMShop::getContext(), 'unknown' );