<commit_before><?php

namespace Laracasts\Integrated\Extensions\Traits;

use PHPUnit_Framework_ExpectationFailedException as PHPUnitException;
use Laracasts\Integrated\Extensions\Traits\WorksWithDatabase;
use Laracasts\Integrated\Extensions\Traits\ApiRequests;
use Laracasts\Integrated\Extensions\IntegrationTrait;
use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\DomCrawler\Form;

trait LaravelTestCase
{

    use IntegrationTrait, ApiRequests, WorksWithDatabase;

    /**
     * Enable method spoofing for HTML forms with a "_method" attribute.
     *
     * @setUp
     */
    protected function enableMethodSpoofing()
    {
        $this->app['request']->enableHttpMethodParameterOverride();
    }

    /**
     * Get the base url for all requests.
     *
     * @return string
     */
    public function baseUrl()
    {
        return "http://localhost";
    }

    /**
     * Submit a form on the page.
     *
     * @param  string $buttonText<commit_msg>Made base url configurable<commit_after><?php

namespace Laracasts\Integrated\Extensions\Traits;

use PHPUnit_Framework_ExpectationFailedException as PHPUnitException;
use Laracasts\Integrated\Extensions\Traits\WorksWithDatabase;
use Laracasts\Integrated\Extensions\Traits\ApiRequests;
use Laracasts\Integrated\Extensions\IntegrationTrait;
use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\DomCrawler\Form;

trait LaravelTestCase
{

    use IntegrationTrait, ApiRequests, WorksWithDatabase;

    /**
     * Enable method spoofing for HTML forms with a "_method" attribute.
     *
     * @setUp
     */
    protected function enableMethodSpoofing()
    {
        $this->app['request']->enableHttpMethodParameterOverride();
    }

    /**
     * Get the base url for all requests.
     *
     * @return string
     */
    public function baseUrl()
    {
        if(isset($this->baseUrl))
        {
            return $this->baseUrl;
        }
        
        return "http://localhost";
    }

    /**
     * Submit a form on the page.
     *
     * @param  string $buttonText
{'fraction_non_alphanumeric': 0.09636803874092009, 'fraction_numerical': 0.0, 'mean_word_length': 3.003875968992248, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '3618672', 'n_tokens_mistral': 612, 'n_tokens_neox': 610, 'n_words': 127}