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 Carbon package. * * (c) Brian Nesbitt <brian@nesb..

Decoded Output download

<?php

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

namespace Tests\Carbon\Exceptions;

use Carbon\Exceptions\BadComparisonUnitException;
use Tests\AbstractTestCase;

class BadComparisonUnitExceptionTest extends AbstractTestCase
{
    public function testComparisonUnitException(): void
    {
        $exception = new BadComparisonUnitException($unit = 'foo');

        $this->assertSame($unit, $exception->getUnit());

        $this->assertSame("Bad comparison unit: 'foo'", $exception->getMessage());
        $this->assertSame(0, $exception->getCode());
        $this->assertNull($exception->getPrevious());
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

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

namespace Tests\Carbon\Exceptions;

use Carbon\Exceptions\BadComparisonUnitException;
use Tests\AbstractTestCase;

class BadComparisonUnitExceptionTest extends AbstractTestCase
{
    public function testComparisonUnitException(): void
    {
        $exception = new BadComparisonUnitException($unit = 'foo');

        $this->assertSame($unit, $exception->getUnit());

        $this->assertSame("Bad comparison unit: 'foo'", $exception->getMessage());
        $this->assertSame(0, $exception->getCode());
        $this->assertNull($exception->getPrevious());
    }
}

Function Calls

None

Variables

None

Stats

MD5 7c16df3125f60b5f75acb5b55f262842
Eval Count 0
Decode Time 110 ms