for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
* @copyright Aimeos (aimeos.org), 2021
*/
namespace Aimeos\Client\JsonApi\Site;
class FactoryTest extends \PHPUnit\Framework\TestCase
{
public function testCreateClient()
$context = \TestHelperJapi::getContext();
$client = \Aimeos\Client\JsonApi\Site\Factory::create( $context, 'attribute' );
$this->assertInstanceOf( \Aimeos\Client\JsonApi\Iface::class, $client );
}
public function testCreateClientEmpty()
$this->expectException( \Aimeos\Client\JsonApi\Exception::class );
\Aimeos\Client\JsonApi\Site\Factory::create( $context, '' );
public function testCreateClientInvalidPath()
\Aimeos\Client\JsonApi\Site\Factory::create( $context, '%^' );
public function testCreateClientInvalidName()
\Aimeos\Client\JsonApi\Site\Factory::create( $context, 'catalog', '%^' );