<?php

namespace Ilios\WebBundle\Tests\Controller;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class IndexControllerTest extends WebTestCase
{
    public function testIndex()
    {
        $client = static::createClient();
        $client->request('GET', '/');
        $response = $client->getResponse();
        $content = $response->getContent();
        $text = file_get_contents('https://s3-us-west-1.amazonaws.com/iliosindex/index.html', false);

        $this->assertSame($text, $content);

    }
}

<?php

namespace Ilios\WebBundle\Tests\Controller;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class IndexControllerTest extends WebTestCase
{
    public function testIndex()
    {
        $client = static::createClient();
        $client->request('GET', '/');
        $response = $client->getResponse();
        $content = $response->getContent();

        $container = $client->getContainer();
        $version = $container->getParameter('ilios_web.version');
        $url = $container->getParameter('ilios_web.bucket_url');
        $fileName = $version?'ilios:' . $version:'index';
        $text = file_get_contents($url . $fileName . '.html', false);

        $this->assertSame($text, $content);

    }
}

Use configuration to test IndexController
Use configuration to test IndexController

This test assumed a final deployment and a released version.  Instead
use our configuration to check that we’re getting the file we think
we’re getting.
