Beberlei\Metrics\Tests\FactoryTest::testCreateThrowExceptionIfOptionsAreInvalid PHP Метод

testCreateThrowExceptionIfOptionsAreInvalid() публичный Метод

public testCreateThrowExceptionIfOptionsAreInvalid ( $expectedMessage, $type, $options = [] )
    public function testCreateThrowExceptionIfOptionsAreInvalid($expectedMessage, $type, $options = array())
    {
        try {
            Factory::create($type, $options);
            $this->fail('An expected exception (MetricsException) has not been raised.');
        } catch (\Exception $e) {
            $this->assertInstanceOf('Beberlei\\Metrics\\MetricsException', $e);
            $this->assertSame($expectedMessage, $e->getMessage());
        }
    }