<commit_before><?php
namespace Bolt\Tests\Mapping;

use Bolt\Tests\BoltUnitTest;
use Bolt\Mapping\MetadataDriver;

/**
 * Class to test src/Mapping/MetadataDriver.
 *
 * @author <NAME> <<EMAIL>>
 */
class MetadataDriverTest extends BoltUnitTest
{
    
    public function testConstruct()
    {
        $app = $this->getApp();
        $map = new MetadataDriver($app['integritychecker'], $app['config']->get('contenttypes'), $app['storage.typemap']);
        $this->assertSame($app['integritychecker'], \PHPUnit_Framework_Assert::readAttribute($map, 'integrityChecker'));
        
    }
    
    public function testInitialize()
    {
        $app = $this->getApp();
        $map = new MetadataDriver($app['integritychecker'], $app['config']->get('contenttypes'), $app['storage.typemap']);
        $map->initialize();
        $metadata = $map->loadMetadataForClass('Bolt\Entity\Users');
        $this->assertNotNull($metadata);
        $this->assertEquals('bolt_users', $metadata->getTableName());
        $field = $metadata->getFieldMapping('id');
        $this->assertEquals('id', $field['fieldname']);
    }
    
}<commit_msg>fix tests to load in taxonomy data<commit_after><?php
namespace Bolt\Tests\Mapping;

use Bolt\Tests\BoltUnitTest;
use Bolt\Mapping\MetadataDriver;

/**
 * Class to test src/Mapping/MetadataDriver.
 *
 * @author <NAME> <<EMAIL>>
 */
class MetadataDriverTest extends BoltUnitTest
{
    
    public function testConstruct()
    {
        $app = $this->getApp();
        $map = new MetadataDriver($app['integritychecker'], $app['config']->get('contenttypes'), $app['config']->get('taxonomies'), $app['storage.typemap']);
        $this->assertSame($app['integritychecker'], \PHPUnit_Framework_Assert::readAttribute($map, 'integrityChecker'));
        
    }
    
    public function testInitialize()
    {
        $app = $this->getApp();
        $map = new MetadataDriver($app['integritychecker'], $app['config']->get('contenttypes'), $app['config']->get('taxonomies'), $app['storage.typemap']);
        $map->initialize();
        $metadata = $map->loadMetadataForClass('Bolt\Entity\Users');
        $this->assertNotNull($metadata);
        $this->assertEquals('bolt_users', $metadata->getTableName());
        $field = $metadata->getFieldMapping('id');
        $this->assertEquals('id', $field['fieldname']);
    }
    
}
{'fraction_non_alphanumeric': 0.18081023454157782, 'fraction_numerical': 0.0, 'mean_word_length': 3.837113402061856, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 35, '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': '7144055', 'n_tokens_mistral': 700, 'n_tokens_neox': 702, 'n_words': 110}