<commit_before><?php

namespace Ger\Bundle\WorkflowBundle\Tests\Controller;


class WorkflowControllerTest extends BaseController
{

    public function testGetWorkflowsAction()
    {
        $client = $this->createAuthenticatedClient();

        $crawler = $client->request('GET', '/api/workflows.json');
        $this->assertTrue($client->getResponse()->getStatusCode() == 200, "Received: " . $client->getResponse()->getStatusCode());
        $content = $client->getResponse()->getContent();
        $workflows_decoded = json_decode($content, true);
        $this->assertTrue(count($workflows_decoded) == 1, "There is more than one workflow in database");
    }

    public function testGetWorkflowAction()
    {
        $client = $this->createAuthenticatedClient();
        $crawler = $client->request('GET', '/api/workflows/testZZ.json');
        $this->assertTrue($client->getResponse()->getStatusCode() == 404);
        $content = $client->getResponse()->getContent();
        if(is_object(json_decode($content))) {<commit_msg>Change Test to reflect fixtures<commit_after><?php

namespace Ger\Bundle\WorkflowBundle\Tests\Controller;


class WorkflowControllerTest extends BaseController
{

    public function testGetWorkflowsAction()
    {
        $client = $this->createAuthenticatedClient();

        $crawler = $client->request('GET', '/api/workflows.json');
        $this->assertTrue($client->getResponse()->getStatusCode() == 200, "Received: " . $client->getResponse()->getStatusCode());
        $content = $client->getResponse()->getContent();
        $workflows_decoded = json_decode($content, true);
        $this->assertTrue(count($workflows_decoded) == 3, "There is more than one workflow in database");
    }

    public function testGetWorkflowAction()
    {
        $client = $this->createAuthenticatedClient();
        $crawler = $client->request('GET', '/api/workflows/testZZ.json');
        $this->assertTrue($client->getResponse()->getStatusCode() == 404);
        $content = $client->getResponse()->getContent();
        if(is_object(json_decode($content))) {
{'fraction_non_alphanumeric': 0.16122840690978887, 'fraction_numerical': 0.0067178502879078695, 'mean_word_length': 4.0, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, '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': '3958481', 'n_tokens_mistral': 596, 'n_tokens_neox': 584, 'n_words': 98}