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), 2018
*/
namespace Aimeos\Client\JsonApi\Supplier;
class FactoryTest extends \PHPUnit\Framework\TestCase
{
public function testCreateClient()
$context = \TestHelperJapi::getContext();
$client = \Aimeos\Client\JsonApi\Supplier\Factory::createClient( $context, 'supplier' );
$this->assertInstanceOf( '\Aimeos\Client\JsonApi\Iface', $client );
}
public function testCreateClientEmpty()
$this->setExpectedException( '\Aimeos\Client\JsonApi\Exception' );
\Aimeos\Client\JsonApi\Supplier\Factory::createClient( $context, '' );
public function testCreateClientInvalidPath()
\Aimeos\Client\JsonApi\Supplier\Factory::createClient( $context, '%^' );
public function testCreateClientInvalidName()
\Aimeos\Client\JsonApi\Supplier\Factory::createClient( $context, 'supplier', '%^' );