Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@..

Decoded Output download

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Termii\Tests;

use Symfony\Component\Notifier\Bridge\Termii\TermiiTransportFactory;
use Symfony\Component\Notifier\Test\TransportFactoryTestCase;

final class TermiiTransportFactoryTest extends TransportFactoryTestCase
{
    public function createFactory(): TermiiTransportFactory
    {
        return new TermiiTransportFactory();
    }

    public static function createProvider(): iterable
    {
        yield ['termii://host.test?from=0611223344&channel=generic', 'termii://[email protected]?from=0611223344&channel=generic'];
    }

    public static function incompleteDsnProvider(): iterable
    {
        yield 'missing auth ID' => ['termii://@default?from=FROM'];
    }

    public static function missingRequiredOptionProvider(): iterable
    {
        yield 'missing option: from' => ['termii://apiKey@default?channel=generic'];
        yield 'missing option: channel' => ['termii://apiKey@default?from=0611223344'];
    }

    public static function supportsProvider(): iterable
    {
        yield [true, 'termii://apiKey@default?from=0611223344&channel=generic'];
        yield [false, 'somethingElse://apiKey@default?from=0611223344&channel=generic'];
    }

    public static function unsupportedSchemeProvider(): iterable
    {
        yield ['somethingElse://apiKey@default?from=0611223344&channel=generic'];
        yield ['somethingElse://apiKey@default']; // missing "from" option
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Notifier\Bridge\Termii\Tests;

use Symfony\Component\Notifier\Bridge\Termii\TermiiTransportFactory;
use Symfony\Component\Notifier\Test\TransportFactoryTestCase;

final class TermiiTransportFactoryTest extends TransportFactoryTestCase
{
    public function createFactory(): TermiiTransportFactory
    {
        return new TermiiTransportFactory();
    }

    public static function createProvider(): iterable
    {
        yield ['termii://host.test?from=0611223344&channel=generic', 'termii://[email protected]?from=0611223344&channel=generic'];
    }

    public static function incompleteDsnProvider(): iterable
    {
        yield 'missing auth ID' => ['termii://@default?from=FROM'];
    }

    public static function missingRequiredOptionProvider(): iterable
    {
        yield 'missing option: from' => ['termii://apiKey@default?channel=generic'];
        yield 'missing option: channel' => ['termii://apiKey@default?from=0611223344'];
    }

    public static function supportsProvider(): iterable
    {
        yield [true, 'termii://apiKey@default?from=0611223344&channel=generic'];
        yield [false, 'somethingElse://apiKey@default?from=0611223344&channel=generic'];
    }

    public static function unsupportedSchemeProvider(): iterable
    {
        yield ['somethingElse://apiKey@default?from=0611223344&channel=generic'];
        yield ['somethingElse://apiKey@default']; // missing "from" option
    }
}

Function Calls

None

Variables

None

Stats

MD5 c850ec6797493f6d8194a347785ae16f
Eval Count 0
Decode Time 112 ms