<commit_before><?php
/**
 * @author <NAME> <<EMAIL>>
 */

namespace Owl\Tests;

use Owl\Application;
use Owl\Http\Request;
use Owl\Router\Router;

class ApplicationTest extends \PHPUnit_Framework_TestCase
{
    protected function createSmallApp($eventManager = null)
    {
        $serviceManager = new \Owl\Service\Manager();

        $router = new Router();
        $router->add('/', ['controller' => 'Index', 'action' => 'index']);

        $serviceManager->setService('router', $router);

        return new Application($serviceManager, $eventManager);
    }

    public function testCreateSmallApp()
    {
        $application = $this->createSmallApp();

        $this->assertInstanceOf('Owl\Application', $application);
        $this->assertInstanceOf('Owl\Service\Manager', $application->getDi());
        $this->assertSame(Application::ENV_PRODUCTION, $application->getEnv());
    }

    public function testHandle()<commit_msg>[Refactoring] Service\Manager - use set insteadof setService for objects<commit_after><?php
/**
 * @author <NAME> <<EMAIL>>
 */

namespace Owl\Tests;

use Owl\Application;
use Owl\Http\Request;
use Owl\Router\Router;

class ApplicationTest extends \PHPUnit_Framework_TestCase
{
    protected function createSmallApp($eventManager = null)
    {
        $serviceManager = new \Owl\Service\Manager();

        $router = new Router();
        $router->add('/', ['controller' => 'Index', 'action' => 'index']);

        $serviceManager->set('router', $router);

        return new Application($serviceManager, $eventManager);
    }

    public function testCreateSmallApp()
    {
        $application = $this->createSmallApp();

        $this->assertInstanceOf('Owl\Application', $application);
        $this->assertInstanceOf('Owl\Service\Manager', $application->getDi());
        $this->assertSame(Application::ENV_PRODUCTION, $application->getEnv());
    }

    public function testHandle()
{'fraction_non_alphanumeric': 0.15280665280665282, 'fraction_numerical': 0.0, 'mean_word_length': 3.706601466992665, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 29, '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': '810823', 'n_tokens_mistral': 548, 'n_tokens_neox': 534, 'n_words': 108}