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\Localization;
use Carbon\Carbon;
use Tests\AbstractTestCase;
class CsTest extends AbstractTestCase
{
public function testDiffForHumansLocalizedInCzech()
{
Carbon::setLocale('cs');
$scope = $this;
$this->wrapWithNonDstDate(function () use ($scope) {
$d = Carbon::now()->subSeconds(1);
$scope->assertSame('1 sekundu nazpt', $d->diffForHumans());
$d = Carbon::now()->subSeconds(2);
$scope->assertSame('2 sekundy nazpt', $d->diffForHumans());
$d = Carbon::now()->subMinutes(1);
$scope->assertSame('1 minutu nazpt', $d->diffForHumans());
$d = Carbon::now()->subMinutes(2);
$scope->assertSame('2 minuty nazpt', $d->diffForHumans());
$d = Carbon::now()->subHours(1);
$scope->assertSame('1 hodinu nazpt', $d->diffForHumans());
$d = Carbon::now()->subHours(2);
$scope->assertSame('2 hodiny nazpt', $d->diffForHumans());
$d = Carbon::now()->subDays(1);
$scope->assertSame('1 den nazpt', $d->diffForHumans());
$d = Carbon::now()->subDays(2);
$scope->assertSame('2 dny nazpt', $d->diffForHumans());
$d = Carbon::now()->subWeeks(1);
$scope->assertSame('1 tden nazpt', $d->diffForHumans());
$d = Carbon::now()->subWeeks(2);
$scope->assertSame('2 tdny nazpt', $d->diffForHumans());
$d = Carbon::now()->subMonths(1);
$scope->assertSame('1 msc nazpt', $d->diffForHumans());
$d = Carbon::now()->subMonths(2);
$scope->assertSame('2 msce nazpt', $d->diffForHumans());
$d = Carbon::now()->subYears(1);
$scope->assertSame('1 rok nazpt', $d->diffForHumans());
$d = Carbon::now()->subYears(2);
$scope->assertSame('2 roky nazpt', $d->diffForHumans());
$d = Carbon::now()->addSecond();
$scope->assertSame('za 1 sekundu', $d->diffForHumans());
$d = Carbon::now()->addSecond();
$d2 = Carbon::now();
$scope->assertSame('1 sekundu pozdji', $d->diffForHumans($d2));
$scope->assertSame('1 sekundu pedtm', $d2->diffForHumans($d));
$scope->assertSame('1 sekundu', $d->diffForHumans($d2, true));
$scope->assertSame('2 sekundy', $d2->diffForHumans($d->addSecond(), true));
});
}
}
?>
Did this file decode correctly?
How would you describe this file?
Thank you for your feedback! This will help us detect malicious PHP files more accurately in the future.
Function Calls
None
Variables
None
Stats
| MD5 | 05742199f05e90a4 |
|---|---|
| Eval Count | 0 |
| Decode Time | 100 ms |
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\Localization;
use Carbon\Carbon;
use Tests\AbstractTestCase;
class CsTest extends AbstractTestCase
{
public function testDiffForHumansLocalizedInCzech()
{
Carbon::setLocale('cs');
$scope = $this;
$this->wrapWithNonDstDate(function () use ($scope) {
$d = Carbon::now()->subSeconds(1);
$scope->assertSame('1 sekundu nazpt', $d->diffForHumans());
$d = Carbon::now()->subSeconds(2);
$scope->assertSame('2 sekundy nazpt', $d->diffForHumans());
$d = Carbon::now()->subMinutes(1);
$scope->assertSame('1 minutu nazpt', $d->diffForHumans());
$d = Carbon::now()->subMinutes(2);
$scope->assertSame('2 minuty nazpt', $d->diffForHumans());
$d = Carbon::now()->subHours(1);
$scope->assertSame('1 hodinu nazpt', $d->diffForHumans());
$d = Carbon::now()->subHours(2);
$scope->assertSame('2 hodiny nazpt', $d->diffForHumans());
$d = Carbon::now()->subDays(1);
$scope->assertSame('1 den nazpt', $d->diffForHumans());
$d = Carbon::now()->subDays(2);
$scope->assertSame('2 dny nazpt', $d->diffForHumans());
$d = Carbon::now()->subWeeks(1);
$scope->assertSame('1 tden nazpt', $d->diffForHumans());
$d = Carbon::now()->subWeeks(2);
$scope->assertSame('2 tdny nazpt', $d->diffForHumans());
$d = Carbon::now()->subMonths(1);
$scope->assertSame('1 msc nazpt', $d->diffForHumans());
$d = Carbon::now()->subMonths(2);
$scope->assertSame('2 msce nazpt', $d->diffForHumans());
$d = Carbon::now()->subYears(1);
$scope->assertSame('1 rok nazpt', $d->diffForHumans());
$d = Carbon::now()->subYears(2);
$scope->assertSame('2 roky nazpt', $d->diffForHumans());
$d = Carbon::now()->addSecond();
$scope->assertSame('za 1 sekundu', $d->diffForHumans());
$d = Carbon::now()->addSecond();
$d2 = Carbon::now();
$scope->assertSame('1 sekundu pozdji', $d->diffForHumans($d2));
$scope->assertSame('1 sekundu pedtm', $d2->diffForHumans($d));
$scope->assertSame('1 sekundu', $d->diffForHumans($d2, true));
$scope->assertSame('2 sekundy', $d2->diffForHumans($d->addSecond(), true));
});
}
}