<?php

namespace CultuurNet\UDB3\Event\ValueObjects;

class AudienceTypeTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @test
     */
    public function it_has_specified_options()
    {
        $options = AudienceType::getConstants();

        $this->assertEquals(
            [
                AudienceType::EVERYONE()->getName() => AudienceType::EVERYONE(),
                AudienceType::MEMBERS()->getName() => AudienceType::MEMBERS(),
                AudienceType::EDUCATION()->getName() => AudienceType::EDUCATION(),
            ],
            $options
        );
    }
}

<?php

namespace CultuurNet\UDB3\Event\ValueObjects;

class AudienceTypeTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @test
     */
    public function it_should_instantiate_audience_type_enums_by_a_name()
    {
        $options = AudienceType::getConstants();

        $this->assertEquals(
            [
                AudienceType::EVERYONE()->getName() => AudienceType::EVERYONE(),
                AudienceType::MEMBERS()->getName() => AudienceType::MEMBERS(),
                AudienceType::EDUCATION()->getName() => AudienceType::EDUCATION(),
            ],
            $options
        );
    }
}

Rename audience type enum instantiation spec
III-1406: Rename audience type enum instantiation spec
