<commit_before><?php namespace CSP\Test;

use CSP\Test\TestCase;
use CSP\Header\ContentSecurityPolicyHeader;
use CSP\Policy;
use CSP\Directive\DirectiveList;
use CSP\Directive\ScriptSrcDirective;
use CSP\Source\SourceList;
use CSP\Source\KeywordSource;

/**
 * @coversNothing
 */
class IntegrationTest extends TestCase
{
    public function testSimpleScriptDirective()
    {
        $header = new ContentSecurityPolicyHeader(new Policy(
            new DirectiveList(array(
                new ScriptSrcDirective(new SourceList(array(
                    new KeywordSource(KeywordSource::KEYWORD_SELF)
                )))
            ))
        ));

        $this->assertSame(
            "Content-Security-Policy: script-src 'self'",
            $header->render()
        );
    }
}<commit_msg>Improve multiline indentation in tests<commit_after><?php namespace CSP\Test;

use CSP\Test\TestCase;
use CSP\Header\ContentSecurityPolicyHeader;
use CSP\Policy;
use CSP\Directive\DirectiveList;
use CSP\Directive\ScriptSrcDirective;
use CSP\Source\SourceList;
use CSP\Source\KeywordSource;

/**
 * @coversNothing
 */
class IntegrationTest extends TestCase
{
    public function testSimpleScriptDirective()
    {
        $header = new ContentSecurityPolicyHeader(
            new Policy(new DirectiveList(array(
                new ScriptSrcDirective(new SourceList(array(
                    new KeywordSource(KeywordSource::KEYWORD_SELF)
                )))
            )))
        );

        $this->assertSame(
            "Content-Security-Policy: script-src 'self'",
            $header->render()
        );
    }
}
{'fraction_non_alphanumeric': 0.10030959752321982, 'fraction_numerical': 0.0, 'mean_word_length': 2.599109131403118, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '7365703', 'n_tokens_mistral': 462, 'n_tokens_neox': 458, 'n_words': 86}