<commit_before><?php
/**
 *
 */

namespace Mvc5\Test\Resolver;

use Mvc5\App;
use Mvc5\Arg;
use Mvc5\ArrayModel;
use Mvc5\Config;
use Mvc5\Container;
use Mvc5\Model;
use Mvc5\Test\Test\TestCase;

class CloneTest
    extends TestCase
{
    /**
     *
     */
    function test_container_array()
    {
        $app = new App;

        $a = new \stdClass;
        $a->b = 'b';

        $app['a'] = $a;

        $clone = clone $app;

        $this->assertEquals($clone, $app);
        $this->assertInstanceOf(\stdClass::class, $clone->get('a'));
        $this->assertEquals($a, $clone->get('a'));
        $this->assertSame($a, $clone->get('a'));
    }

    /**
     *
     */
    function test_scope_object()
    {
        $app = new App(null, null, new Config);<commit_msg>clone app with own scope<commit_after><?php
/**
 *
 */

namespace Mvc5\Test\Resolver;

use Mvc5\App;
use Mvc5\Arg;
use Mvc5\ArrayModel;
use Mvc5\Config;
use Mvc5\Container;
use Mvc5\Plugin\Link;
use Mvc5\Test\Test\TestCase;

class CloneTest
    extends TestCase
{
    /**
     *
     */
    function test_container_array()
    {
        $app = new App;

        $a = new \stdClass;
        $a->b = 'b';

        $app['a'] = $a;

        $clone = clone $app;

        $this->assertEquals($clone, $app);
        $this->assertInstanceOf(\stdClass::class, $clone->get('a'));
        $this->assertEquals($a, $clone->get('a'));
        $this->assertSame($a, $clone->get('a'));
    }

    /**
     *
     */
    function test_scope_object()
    {
        $app = new App(null, null, new Config);

        $this->assertEquals($app, clone $app);
    }

    /**
     *
     */
    function test_scope_self()
    {
        $app = new App(null, null, new Link);
{'fraction_non_alphanumeric': 0.17753201396973226, 'fraction_numerical': 0.009313154831199068, 'mean_word_length': 2.136861313868613, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 20, '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': '7190582', 'n_tokens_mistral': 621, 'n_tokens_neox': 612, 'n_words': 118}