<commit_before><commit_msg>Add back to website spec.<commit_after><?php

namespace spec\App\Http\Handlers;

use App\Http\Handlers\BackToWebsite;
use Illuminate\Container\Container;
use Orchestra\Contracts\Foundation\Foundation;
use Orchestra\Widget\Handlers\Menu;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;

class BackToWebsiteSpec extends ObjectBehavior
{
    function let(Container $app)
    {
        $this->beConstructedWith($app);
    }

    function it_is_initializable()
    {
        $this->shouldHaveType(BackToWebsite::class);
    }

    function it_can_be_display_when_is_installed(Container $app, Foundation $foundation, Menu $menu)
    {
        $app->offsetGet('orchestra.app')->willReturn($foundation);
        $app->make('orchestra.platform.menu')->willReturn($menu);

        $foundation->installed()->willReturn(true);

        $this->authorize()->shouldReturn(true);
    }

    function it_cant_be_display_when_is_not_installed(Container $app, Foundation $foundation, Menu $menu)
    {
        $app->offsetGet('orchestra.app')->willReturn($foundation);
        $app->make('orchestra.platform.menu')->willReturn($menu);

        $foundation->installed()->willReturn(false);

        $this->authorize()->shouldReturn(false);
    }
}
{'fraction_non_alphanumeric': 0.13842482100238662, 'fraction_numerical': 0.0, 'mean_word_length': 4.219917012448133, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 21, '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': '5701806', 'n_tokens_mistral': 383, 'n_tokens_neox': 375, 'n_words': 52}