<commit_before><?php

namespace PrestaShop\FunctionalTest;

class UpgradeTest extends \PrestaShop\TestCase\TestCase
{
    protected static $cache_initial_state = false;

    protected static function shopManagerOptions()
    {
        return [
            'conf' => [
                'shop.filesystem_path' => __DIR__.'/UpgradeTest/prestashop',
                'shop.prestashop_version' => '1.6.0.9'
            ]
        ];
    }

    public function beforeUpgrade()
    {
        $scenario = $this->getJSONExample('invoice/simple-order.json');
        $output = InvoiceTest::runScenario($this->shop, $scenario);

        $this->writeArtefact('simple-order-before-upgrade.pdf', $output['pdf']);

        return $output;
    }

    public function afterUpgrade($before)
    {
        $om = $this->shop->getOrderManager()->visit($before['id_order']);
        $this->writeArtefact('simple-order-after-upgrade.pdf', $om->getInvoicePDFData());
    }<commit_msg>// need login after upgrade<commit_after><?php

namespace PrestaShop\FunctionalTest;

class UpgradeTest extends \PrestaShop\TestCase\TestCase
{
    protected static $cache_initial_state = false;

    protected static function shopManagerOptions()
    {
        return [
            'conf' => [
                'shop.filesystem_path' => __DIR__.'/UpgradeTest/prestashop',
                'shop.prestashop_version' => '1.6.0.9'
            ]
        ];
    }

    public function beforeUpgrade()
    {
        $scenario = $this->getJSONExample('invoice/simple-order.json');
        $output = InvoiceTest::runScenario($this->shop, $scenario);

        $this->writeArtefact('simple-order-before-upgrade.pdf', $output['pdf']);

        return $output;
    }

    public function afterUpgrade($before)
    {
        $this->shop->getBackOfficeNavigator()->login();

        $om = $this->shop->getOrderManager()->visit($before['id_order']);
        $this->writeArtefact('simple-order-after-upgrade.pdf', $om->getInvoicePDFData());
    }
{'fraction_non_alphanumeric': 0.14710327455919395, 'fraction_numerical': 0.004030226700251889, 'mean_word_length': 2.7471698113207546, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '7294848', 'n_tokens_mistral': 610, 'n_tokens_neox': 588, 'n_words': 85}