Joli\SlackSecretSanta\Tests\SantaControllerTest::test_summary_works_with_valid_hash PHP Method

test_summary_works_with_valid_hash() public method

    public function test_summary_works_with_valid_hash()
    {
        $secretSanta = new SecretSanta('yolo', ['toto1' => 'toto2', 'toto2' => 'toto3', 'toto3' => 'toto1'], null);
        $secretSanta->markAssociationAsProceeded('toto1');
        $secretSanta->markAssociationAsProceeded('toto2');
        $secretSanta->markAssociationAsProceeded('toto3');
        $client = static::createClient();
        $this->prepareSession($client, 'secret-santa-yolo', $secretSanta);
        $crawler = $client->request('GET', '/summary/yolo');
        $response = $client->getResponse();
        $this->assertSame(200, $response->getStatusCode());
        $this->assertContains('Spoiler alert', $response->getContent());
        $this->assertContains('@toto1 must offer a gift to @toto2', $response->getContent());
    }