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 namespace Illuminate\Tests\Integration\Generators; class TestMakeCommandTest exten..
Decoded Output download
<?php
namespace Illuminate\Tests\Integration\Generators;
class TestMakeCommandTest extends TestCase
{
protected $files = [
'tests/Feature/FooTest.php',
'tests/Unit/FooTest.php',
];
public function testItCanGenerateFeatureTest()
{
$this->artisan('make:test', ['name' => 'FooTest'])
->assertExitCode(0);
$this->assertFileContains([
'namespace Tests\Feature;',
'use Illuminate\Foundation\Testing\RefreshDatabase;',
'use Illuminate\Foundation\Testing\WithFaker;',
'use Tests\TestCase;',
'class FooTest extends TestCase',
], 'tests/Feature/FooTest.php');
}
public function testItCanGenerateUnitTest()
{
$this->artisan('make:test', ['name' => 'FooTest', '--unit' => true])
->assertExitCode(0);
$this->assertFileContains([
'namespace Tests\Unit;',
'use PHPUnit\Framework\TestCase;',
'class FooTest extends TestCase',
], 'tests/Unit/FooTest.php');
}
public function testItCanGenerateFeatureTestUsingPest()
{
$this->artisan('make:test', ['name' => 'FooTest', '--pest' => true])
->assertExitCode(0);
$this->assertFileContains([
'test(\'example\', function () {',
'$response = $this->get(\'/\');',
'$response->assertStatus(200);',
], 'tests/Feature/FooTest.php');
}
public function testItCanGenerateUnitTestUsingPest()
{
$this->artisan('make:test', ['name' => 'FooTest', '--unit' => true, '--pest' => true])
->assertExitCode(0);
$this->assertFileContains([
'test(\'example\', function () {',
'expect(true)->toBeTrue();',
], 'tests/Unit/FooTest.php');
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Illuminate\Tests\Integration\Generators;
class TestMakeCommandTest extends TestCase
{
protected $files = [
'tests/Feature/FooTest.php',
'tests/Unit/FooTest.php',
];
public function testItCanGenerateFeatureTest()
{
$this->artisan('make:test', ['name' => 'FooTest'])
->assertExitCode(0);
$this->assertFileContains([
'namespace Tests\Feature;',
'use Illuminate\Foundation\Testing\RefreshDatabase;',
'use Illuminate\Foundation\Testing\WithFaker;',
'use Tests\TestCase;',
'class FooTest extends TestCase',
], 'tests/Feature/FooTest.php');
}
public function testItCanGenerateUnitTest()
{
$this->artisan('make:test', ['name' => 'FooTest', '--unit' => true])
->assertExitCode(0);
$this->assertFileContains([
'namespace Tests\Unit;',
'use PHPUnit\Framework\TestCase;',
'class FooTest extends TestCase',
], 'tests/Unit/FooTest.php');
}
public function testItCanGenerateFeatureTestUsingPest()
{
$this->artisan('make:test', ['name' => 'FooTest', '--pest' => true])
->assertExitCode(0);
$this->assertFileContains([
'test(\'example\', function () {',
'$response = $this->get(\'/\');',
'$response->assertStatus(200);',
], 'tests/Feature/FooTest.php');
}
public function testItCanGenerateUnitTestUsingPest()
{
$this->artisan('make:test', ['name' => 'FooTest', '--unit' => true, '--pest' => true])
->assertExitCode(0);
$this->assertFileContains([
'test(\'example\', function () {',
'expect(true)->toBeTrue();',
], 'tests/Unit/FooTest.php');
}
}
Function Calls
None |
Stats
MD5 | 07eaedbef71fa9ea37a8f4fba253638e |
Eval Count | 0 |
Decode Time | 79 ms |