<commit_before><?php

/*
* This file is part of the XabbuhPandaBundle package.
*
* (c) <NAME> <<EMAIL>>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Xabbuh\PandaBundle\Tests\Controller;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Xabbuh\PandaBundle\Event\EncodingProgressEvent;
use Xabbuh\PandaBundle\Event\EncodingCompleteEvent;
use Xabbuh\PandaBundle\Event\VideoCreatedEvent;
use Xabbuh\PandaBundle\Event\VideoEncodedEvent;

/**
 * Test the bundle's controllers.
 *
 * @author <NAME> <<EMAIL>>
 */
class ControllerTest extends WebTestCase
{
    /**
     * An event dispatched by the tested application
     * @var \Symfony\Component\EventDispatcher\Event
     */
    public $event;

    /**
     * Count dispatched events
     * @var int
     */
    public $eventCounter;


    /**
     * {@inheritDoc}
     */
    public function setUp()
    {
        try {
            self::getKernelClass();
        } catch (\RuntimeException $e) {
            $this->markTestIncomplete('missing kernel configuration');
        }

        $this->event = null;
        $this->eventCounter = 0;
    }

    /**
     * Ensure that a timestamp is added when not provided
     */
    public function testSignWithoutTimestamp()
    {
        $client = static::createClient();
        $container = $client->getContainer();
        $defaultCloud = $container->getParameter("xabbuh_panda.cloud.default");

        $client->request("GET", "/sign/$defaultCloud");
        $response = $client->getResponse();

        $this->assertTrue($response->isSuccessful());
        $this->assertEquals("application/json", $response->headers->get("content-type"));<commit_msg>use markTestSkipped() instead of markTestIncomplete() (fixes changes introduced in 1308f50)<commit_after><?php

/*
* This file is part of the XabbuhPandaBundle package.
*
* (c) <NAME> <<EMAIL>>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Xabbuh\PandaBundle\Tests\Controller;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Xabbuh\PandaBundle\Event\EncodingProgressEvent;
use Xabbuh\PandaBundle\Event\EncodingCompleteEvent;
use Xabbuh\PandaBundle\Event\VideoCreatedEvent;
use Xabbuh\PandaBundle\Event\VideoEncodedEvent;

/**
 * Test the bundle's controllers.
 *
 * @author <NAME> <<EMAIL>>
 */
class ControllerTest extends WebTestCase
{
    /**
     * An event dispatched by the tested application
     * @var \Symfony\Component\EventDispatcher\Event
     */
    public $event;

    /**
     * Count dispatched events
     * @var int
     */
    public $eventCounter;


    /**
     * {@inheritDoc}
     */
    public function setUp()
    {
        try {
            self::getKernelClass();
        } catch (\RuntimeException $e) {
            $this->markTestSkipped('missing kernel configuration');
        }

        $this->event = null;
        $this->eventCounter = 0;
    }

    /**
     * Ensure that a timestamp is added when not provided
     */
    public function testSignWithoutTimestamp()
    {
        $client = static::createClient();
        $container = $client->getContainer();
        $defaultCloud = $container->getParameter("xabbuh_panda.cloud.default");

        $client->request("GET", "/sign/$defaultCloud");
        $response = $client->getResponse();

        $this->assertTrue($response->isSuccessful());
        $this->assertEquals("application/json", $response->headers->get("content-type"));
{'fraction_non_alphanumeric': 0.1280402571987699, 'fraction_numerical': 0.0022365110427732737, 'mean_word_length': 3.029279279279279, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 39, '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': '3499851', 'n_tokens_mistral': 1040, 'n_tokens_neox': 998, 'n_words': 234}