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), 2015-2022
*/
namespace Aimeos\Client\Html\Catalog\Session;
class StandardTest extends \PHPUnit\Framework\TestCase
{
private $object;
private $context;
private $view;
protected function setUp() : void
$this->view = \TestHelperHtml::view();
$this->context = \TestHelperHtml::context();
$this->object = new \Aimeos\Client\Html\Catalog\Session\Standard( $this->context );
$this->object->setView( $this->view );
}
protected function tearDown() : void
unset( $this->object, $this->context, $this->view );
public function testHeader()
$output = $this->object->header();
$this->assertStringContainsString( '<link rel="stylesheet"', $output );
$this->assertStringContainsString( '<script defer', $output );
public function testBody()
$this->object->setView( $this->object->data( $this->view ) );
$output = $this->object->body();
$this->assertStringStartsWith( '<section class="aimeos catalog-session"', $output );
public function testGetSubClient()
$client = $this->object->getSubClient( 'seen', 'Standard' );
$this->assertInstanceOf( '\\Aimeos\\Client\\HTML\\Iface', $client );