<commit_before><?php

namespace Aimeos\ShopBundle\Tests\Controller;

use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;


class CatalogControllerTest extends WebTestCase
{
	public function testCount()
	{
		$client = static::createClient();
		$client->request( 'GET', '/unittest/de/EUR/count' );
		$content = $client->getResponse()->getContent();

		$this->assertContains( '".catalog-filter-count li.cat-item"', $content );
		$this->assertContains( '".catalog-filter-attribute .attribute-lists li.attr-item"', $content );
	}


	public function testFilterSearch()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$this->assertEquals( 1, $crawler->filter( '.catalog-filter-search' )->count() );

		$form = $crawler->filter( '.catalog-filter-search button' )->form();
		$form['f_search'] = 'Cafe';
		$crawler = $client->submit( $form );

		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->count() );
	}


 	public function testFilterTree()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$this->assertEquals( 1, $crawler->filter( '.catalog-filter-tree' )->count() );

		$link = $crawler->filter( '.catalog-filter-tree a.cat-item' )->link();
		$crawler = $client->click( $link );

		$link = $crawler->filter( '.catalog-filter-tree .categories a.cat-item' )->link();
		$crawler = $client->click( $link );

		$link = $crawler->filter( '.catalog-filter-tree .coffee a.cat-item' )->link();
		$crawler = $client->click( $link );

		$this->assertEquals( 3, $crawler->filter( '.catalog-stage-breadcrumb li' )->count() );
		$this->assertEquals( 1, $crawler->filter( '.catalog-list-promo .product a:contains("Cafe Noire Expresso")' )->count() );
	}


	public function testFilterAttribute()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$this->assertEquals( 1, $crawler->filter( '.catalog-filter-attribute' )->count() );

		$nodes = $crawler->filter( '.catalog-filter-attribute .attr-size span:contains("XS")' );
		$id = $nodes->parents()->filter( '.attr-item' )->attr( 'data-id');

		$form = $crawler->filter( '.catalog-filter .btn-primary' )->form();
		$values = $form->getPhpValues();
		$values['f_attrid'] = array( $id );
		$crawler = $client->request( $form->getMethod(), $form->getUri(), $values, $form->getPhpFiles() );

		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->count() );
		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Cappuccino")' )->count() );
	}


	public function testStageBreadcrumb()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link();
		$crawler = $client->click( $link );

		$this->assertEquals( 1, $crawler->filter( '.catalog-stage-breadcrumb li' )->count() );

		$link = $crawler->filter( '.catalog-stage-breadcrumb a' )->link();
		$crawler = $client->click( $link );

		$this->assertEquals( 1, $crawler->filter( '.catalog-list' )->count() );
		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->count() );
		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Cappuccino")' )->count() );
	}


	public function testStageNavigator()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$link = $crawler->filter( '.catalog-list .pagination .option-name' )->link();
		$crawler = $client->click( $link );

		$link = $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->link();
		$crawler = $client->click( $link );

		$this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() );
		$this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Unittest: Bundle")' )->count() );

		$link = $crawler->filter( '.catalog-stage-navigator a.next' )->link();
		$crawler = $client->click( $link );

		$this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() );
		$this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Unterproduct 3")' )->count() );

		$link = $crawler->filter( '.catalog-stage-navigator a.prev' )->link();
		$crawler = $client->click( $link );

		$this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() );
		$this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Unittest: Bundle")' )->count() );
	}


	public function testListSortationName()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$link = $crawler->filter( '.catalog-list .pagination .option-name' )->link();
		$crawler = $client->click( $link );

		$products = $crawler->filter( '.catalog-list-items .product' );
		$this->assertEquals( 1, $products->eq( 0 )->filter( 'h2:contains("Cafe Noire Cappuccino")' )->count() );
		$this->assertEquals( 1, $products->eq( 1 )->filter( 'h2:contains("Cafe Noire Expresso")' )->count() );
		$this->assertEquals( 1, $products->eq( 2 )->filter( 'h2:contains("Unittest: Bundle")' )->count() );
		$this->assertEquals( 1, $products->eq( 3 )->filter( 'h2:contains("Unterproduct 3")' )->count() );

		$link = $crawler->filter( '.catalog-list .pagination .option-name' )->link();
		$crawler = $client->click( $link );

		$products = $crawler->filter( '.catalog-list-items .product' );

		$this->assertGreaterThan( 3, $products->count() );
		$this->assertEquals( 1, $products->eq( 0 )->filter( 'h2:contains("Unterproduct 3")' )->count() );
		$this->assertEquals( 1, $products->eq( 1 )->filter( 'h2:contains("Unittest: Bundle")' )->count() );
		$this->assertEquals( 1, $products->eq( 2 )->filter( 'h2:contains("Cafe Noire Expresso")' )->count() );
		$this->assertEquals( 1, $products->eq( 3 )->filter( 'h2:contains("Cafe Noire Cappuccino")' )->count() );
	}


	public function testListSortationPrice()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$link = $crawler->filter( '.catalog-list .pagination .option-price' )->link();
		$crawler = $client->click( $link );

		$products = $crawler->filter( '.catalog-list-items .product' );
		$count = $products->count();

		$this->assertGreaterThan( 2, $count );
		$this->assertEquals( 1, $products->eq( $count - 2 )->filter( '.value:contains("600.00 €")' )->count() );
		$this->assertEquals( 1, $products->eq( $count - 1 )->filter( '.value:contains("600.00 €")' )->count() );

		$link = $crawler->filter( '.catalog-list .pagination .option-price' )->link();
		$crawler = $client->click( $link );

		$products = $crawler->filter( '.catalog-list-items .product' );
		$this->assertEquals( 1, $products->eq( 0 )->filter( '.value:contains("600.00 €")' )->count() );
		$this->assertEquals( 1, $products->eq( 1 )->filter( '.value:contains("600.00 €")' )->count() );
	}


	public function testDetailPinned()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link();
		$crawler = $client->click( $link );

		$link = $crawler->filter( '.catalog-detail a.actions-button-pin' )->link();
		$crawler = $client->click( $link );

		$this->assertEquals( 1, $crawler->filter( '.catalog-session-pinned .pinned-item' )->count() );
	}


	public function testDetailLastSeen()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link();
		$crawler = $client->click( $link );

		$this->assertEquals( 1, $crawler->filter( '.catalog-session-seen .seen-item' )->count() );
	}


	public function testSuggest()
	{
		$client = static::createClient();
		$client->request( 'GET', '/unittest/de/EUR/suggest', array( 'f_search' => 'Cafe' ) );
		$content = $client->getResponse()->getContent();

		$this->assertStringStartsWith( '[{', $content );
	}


	public function testStock()
	{
		$client = static::createClient();
		$client->request( 'GET', '/unittest/de/EUR/stock' );
		$content = $client->getResponse()->getContent();

		$this->assertContains( '.aimeos .product .stock', $content );
		$this->assertContains( '.aimeos .catalog-detail-basket', $content );
	}


	public function testCountComponent()
	{
		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
			->setMethods( array( 'getOutput' ) )
			->disableOriginalConstructor()
			->getMock();

		$response = Response::create( 'test' );
		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) );

		$this->assertSame( $response, $mock->countComponentAction() );
	}


	public function testDetailComponent()
	{
		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
			->setMethods( array( 'getOutput' ) )
			->disableOriginalConstructor()
			->getMock();

		$response = Response::create( 'test' );
		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) );

		$this->assertSame( $response, $mock->detailComponentAction() );
	}


	public function testFilterComponent()
	{
		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
			->setMethods( array( 'getOutput' ) )
			->disableOriginalConstructor()
			->getMock();

		$response = Response::create( 'test' );
		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) );

		$this->assertSame( $response, $mock->filterComponentAction() );
	}


	public function testListComponent()
	{
		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
			->setMethods( array( 'getOutput' ) )
			->disableOriginalConstructor()
			->getMock();

		$response = Response::create( 'test' );
		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) );

		$this->assertSame( $response, $mock->listComponentAction() );
	}


	public function testSessionComponent()
	{
		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
			->setMethods( array( 'getOutput' ) )
			->disableOriginalConstructor()
			->getMock();

		$response = Response::create( 'test' );
		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) );

		$this->assertSame( $response, $mock->sessionComponentAction() );
	}


	public function testStageComponent()
	{
		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
			->setMethods( array( 'getOutput' ) )
			->disableOriginalConstructor()
			->getMock();

		$response = Response::create( 'test' );
		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) );

		$this->assertSame( $response, $mock->stageComponentAction() );
	}


	public function testStockComponent()
	{
		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
			->setMethods( array( 'getOutput' ) )
			->disableOriginalConstructor()
			->getMock();

		$response = Response::create( 'test' );
		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) );

		$this->assertSame( $response, $mock->stockComponentAction() );
	}
}
<commit_msg>More stable tests<commit_after><?php

namespace Aimeos\ShopBundle\Tests\Controller;

use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;


class CatalogControllerTest extends WebTestCase
{
	public function testCount()
	{
		$client = static::createClient();
		$client->request( 'GET', '/unittest/de/EUR/count' );
		$content = $client->getResponse()->getContent();

		$this->assertContains( '".catalog-filter-count li.cat-item"', $content );
		$this->assertContains( '".catalog-filter-attribute .attribute-lists li.attr-item"', $content );
	}


	public function testFilterSearch()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$this->assertEquals( 1, $crawler->filter( '.catalog-filter-search' )->count() );

		$form = $crawler->filter( '.catalog-filter-search button' )->form();
		$form['f_search'] = 'Cafe';
		$crawler = $client->submit( $form );

		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Unittest: Bundle")' )->count() );
	}


 	public function testFilterTree()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$this->assertEquals( 1, $crawler->filter( '.catalog-filter-tree' )->count() );

		$link = $crawler->filter( '.catalog-filter-tree a.cat-item' )->link();
		$crawler = $client->click( $link );

		$link = $crawler->filter( '.catalog-filter-tree .categories a.cat-item' )->link();
		$crawler = $client->click( $link );

		$link = $crawler->filter( '.catalog-filter-tree .coffee a.cat-item' )->link();
		$crawler = $client->click( $link );

		$this->assertEquals( 3, $crawler->filter( '.catalog-stage-breadcrumb li' )->count() );
		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->count() );
	}


	public function testFilterAttribute()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$this->assertEquals( 1, $crawler->filter( '.catalog-filter-attribute' )->count() );

		$nodes = $crawler->filter( '.catalog-filter-attribute .attr-size span:contains("XS")' );
		$id = $nodes->parents()->filter( '.attr-item' )->attr( 'data-id');

		$form = $crawler->filter( '.catalog-filter .btn-primary' )->form();
		$values = $form->getPhpValues();
		$values['f_attrid'] = array( $id );
		$crawler = $client->request( $form->getMethod(), $form->getUri(), $values, $form->getPhpFiles() );

		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->count() );
		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Cappuccino")' )->count() );
	}


	public function testStageBreadcrumb()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link();
		$crawler = $client->click( $link );

		$this->assertEquals( 1, $crawler->filter( '.catalog-stage-breadcrumb li' )->count() );

		$link = $crawler->filter( '.catalog-stage-breadcrumb a' )->link();
		$crawler = $client->click( $link );

		$this->assertEquals( 1, $crawler->filter( '.catalog-list' )->count() );
		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->count() );
		$this->assertEquals( 1, $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Cappuccino")' )->count() );
	}


	public function testStageNavigator()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$link = $crawler->filter( '.catalog-list .pagination .option-name' )->link();
		$crawler = $client->click( $link );

		$link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Cappuccino")' )->link();
		$crawler = $client->click( $link );

		$this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() );
		$this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Cafe Noire Cappuccino")' )->count() );

		$link = $crawler->filter( '.catalog-stage-navigator a.next' )->link();
		$crawler = $client->click( $link );

		$this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() );
		$this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Cafe Noire Expresso")' )->count() );

		$link = $crawler->filter( '.catalog-stage-navigator a.prev' )->link();
		$crawler = $client->click( $link );

		$this->assertEquals( 1, $crawler->filter( '.catalog-detail' )->count() );
		$this->assertEquals( 1, $crawler->filter( '.catalog-detail:contains("Cafe Noire Cappuccino")' )->count() );
	}


	public function testListSortationName()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$link = $crawler->filter( '.catalog-list .pagination .option-name' )->link();
		$crawler = $client->click( $link );

		$products = $crawler->filter( '.catalog-list-items .product' );
		$this->assertEquals( 1, $products->eq( 0 )->filter( 'h2:contains("Cafe Noire Cappuccino")' )->count() );
		$this->assertEquals( 1, $products->eq( 1 )->filter( 'h2:contains("Cafe Noire Expresso")' )->count() );
		$this->assertEquals( 1, $products->eq( 2 )->filter( 'h2:contains("Unittest: Bundle")' )->count() );
		$this->assertEquals( 1, $products->eq( 3 )->filter( 'h2:contains("Unterproduct 3")' )->count() );

		$link = $crawler->filter( '.catalog-list .pagination .option-name' )->link();
		$crawler = $client->click( $link );

		$products = $crawler->filter( '.catalog-list-items .product' );

		$this->assertGreaterThan( 3, $products->count() );
		$this->assertEquals( 1, $products->eq( 0 )->filter( 'h2:contains("Unterproduct 3")' )->count() );
		$this->assertEquals( 1, $products->eq( 1 )->filter( 'h2:contains("Unittest: Bundle")' )->count() );
		$this->assertEquals( 1, $products->eq( 2 )->filter( 'h2:contains("Cafe Noire Expresso")' )->count() );
		$this->assertEquals( 1, $products->eq( 3 )->filter( 'h2:contains("Cafe Noire Cappuccino")' )->count() );
	}


	public function testListSortationPrice()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$link = $crawler->filter( '.catalog-list .pagination .option-price' )->link();
		$crawler = $client->click( $link );

		$products = $crawler->filter( '.catalog-list-items .product' );
		$count = $products->count();

		$this->assertGreaterThan( 2, $count );
		$this->assertEquals( 1, $products->eq( $count - 2 )->filter( '.value:contains("600.00 €")' )->count() );
		$this->assertEquals( 1, $products->eq( $count - 1 )->filter( '.value:contains("600.00 €")' )->count() );

		$link = $crawler->filter( '.catalog-list .pagination .option-price' )->link();
		$crawler = $client->click( $link );

		$products = $crawler->filter( '.catalog-list-items .product' );
		$this->assertEquals( 1, $products->eq( 0 )->filter( '.value:contains("600.00 €")' )->count() );
		$this->assertEquals( 1, $products->eq( 1 )->filter( '.value:contains("600.00 €")' )->count() );
	}


	public function testDetailPinned()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link();
		$crawler = $client->click( $link );

		$link = $crawler->filter( '.catalog-detail a.actions-button-pin' )->link();
		$crawler = $client->click( $link );

		$this->assertEquals( 1, $crawler->filter( '.catalog-session-pinned .pinned-item' )->count() );
	}


	public function testDetailLastSeen()
	{
		$client = static::createClient();
		$crawler = $client->request( 'GET', '/unittest/de/EUR/list' );

		$link = $crawler->filter( '.catalog-list-items .product a:contains("Cafe Noire Expresso")' )->link();
		$crawler = $client->click( $link );

		$this->assertEquals( 1, $crawler->filter( '.catalog-session-seen .seen-item' )->count() );
	}


	public function testSuggest()
	{
		$client = static::createClient();
		$client->request( 'GET', '/unittest/de/EUR/suggest', array( 'f_search' => 'Cafe' ) );
		$content = $client->getResponse()->getContent();

		$this->assertStringStartsWith( '[{', $content );
	}


	public function testStock()
	{
		$client = static::createClient();
		$client->request( 'GET', '/unittest/de/EUR/stock' );
		$content = $client->getResponse()->getContent();

		$this->assertContains( '.aimeos .product .stock', $content );
		$this->assertContains( '.aimeos .catalog-detail-basket', $content );
	}


	public function testCountComponent()
	{
		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
			->setMethods( array( 'getOutput' ) )
			->disableOriginalConstructor()
			->getMock();

		$response = Response::create( 'test' );
		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) );

		$this->assertSame( $response, $mock->countComponentAction() );
	}


	public function testDetailComponent()
	{
		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
			->setMethods( array( 'getOutput' ) )
			->disableOriginalConstructor()
			->getMock();

		$response = Response::create( 'test' );
		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) );

		$this->assertSame( $response, $mock->detailComponentAction() );
	}


	public function testFilterComponent()
	{
		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
			->setMethods( array( 'getOutput' ) )
			->disableOriginalConstructor()
			->getMock();

		$response = Response::create( 'test' );
		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) );

		$this->assertSame( $response, $mock->filterComponentAction() );
	}


	public function testListComponent()
	{
		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
			->setMethods( array( 'getOutput' ) )
			->disableOriginalConstructor()
			->getMock();

		$response = Response::create( 'test' );
		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) );

		$this->assertSame( $response, $mock->listComponentAction() );
	}


	public function testSessionComponent()
	{
		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
			->setMethods( array( 'getOutput' ) )
			->disableOriginalConstructor()
			->getMock();

		$response = Response::create( 'test' );
		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) );

		$this->assertSame( $response, $mock->sessionComponentAction() );
	}


	public function testStageComponent()
	{
		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
			->setMethods( array( 'getOutput' ) )
			->disableOriginalConstructor()
			->getMock();

		$response = Response::create( 'test' );
		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) );

		$this->assertSame( $response, $mock->stageComponentAction() );
	}


	public function testStockComponent()
	{
		$mock = $this->getMockBuilder( 'Aimeos\ShopBundle\Controller\CatalogController' )
			->setMethods( array( 'getOutput' ) )
			->disableOriginalConstructor()
			->getMock();

		$response = Response::create( 'test' );
		$mock->expects( $this->once() )->method( 'getOutput' )->will( $this->returnValue( $response ) );

		$this->assertSame( $response, $mock->stockComponentAction() );
	}
}

{'fraction_non_alphanumeric': 0.21845744223997252, 'fraction_numerical': 0.006570471527956712, 'mean_word_length': 4.659052247873633, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 561, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6634835', 'n_tokens_mistral': 8618, 'n_tokens_neox': 7909, 'n_words': 1508}