<commit_before><?php
namespace Picamator\ObjectManager\Tests\Unit;

use Picamator\ObjectManager\ObjectManager;

class ObjectManagerTest extends BaseTest
{
    /**
     * @var ObjectManager
     */
    private $objectManager;

    protected function setUp()
    {
        parent::setUp();

        $this->objectManager = new ObjectManager();
    }

    /**
     * @dataProvider providerCreate
     *
     * @param array $arguments
     */
    public function testCreate(array $arguments)
    {
        $className = '\DateTime';

        $actual = $this->objectManager->create($className, $arguments);
        $this->assertInstanceOf($className, $actual);
    }

    /**
     * @expectedException \Picamator\ObjectManager\Exception\RuntimeException
     */
    public function testFailCreate()
    {
        $this->objectManager->create('Picamator\ObjectManager\ObjectManager', [1, 2]);
    }

    public function providerCreate()
    {
        return [
            [['now']],
            [[]]
        ];
    }
}
<commit_msg>Increase test coverage<commit_after><?php
namespace Picamator\ObjectManager\Tests\Unit;

use Picamator\ObjectManager\ObjectManager;

class ObjectManagerTest extends BaseTest
{
    /**
     * @var ObjectManager
     */
    private $objectManager;

    protected function setUp()
    {
        parent::setUp();

        $this->objectManager = new ObjectManager();
    }

    /**
     * @dataProvider providerCreate
     *
     * @param array $arguments
     */
    public function testCreate(array $arguments)
    {
        $className = '\DateTime';

        $actual = $this->objectManager->create($className, $arguments);
        $this->objectManager->create($className, $arguments); // double run to test internal cache

        $this->assertInstanceOf($className, $actual);
    }

    /**
     * @expectedException \Picamator\ObjectManager\Exception\RuntimeException
     */
    public function testFailCreate()
    {
        $this->objectManager->create('Picamator\ObjectManager\ObjectManager', [1, 2]);
    }

    public function providerCreate()
    {
        return [
            [['now']],
            [[]]
        ];
    }
}

{'fraction_non_alphanumeric': 0.128538283062645, 'fraction_numerical': 0.0018561484918793504, 'mean_word_length': 2.4496, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '6943518', 'n_tokens_mistral': 602, 'n_tokens_neox': 583, 'n_words': 108}