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 Livewire\Mechanisms\Tests; use Livewire\Livewire; class DirectlyAssignC..
Decoded Output download
<?php
namespace Livewire\Mechanisms\Tests;
use Livewire\Livewire;
class DirectlyAssignComponentParametersAsPropertiesUnitTest extends \Tests\TestCase
{
public function test_parameters_are_directly_set_as_properties_without_mount_method()
{
Livewire::test(ComponentWithDirectlyAssignedProperties::class, [
'foo' => 'bar',
'baz' => 'bob',
])->assertSeeText('barbob');
}
public function test_parameters_are_directly_set_as_properties_even_if_mount_method_accepts_them_too()
{
Livewire::test(ComponentWithDirectlyAssignedPropertiesAndMountMethod::class, [
'foo' => 'bar',
'baz' => 'bob',
])->assertSeeText('barbobbarbob');
}
}
class ComponentWithDirectlyAssignedProperties extends \Livewire\Component
{
public $foo;
public $baz;
public function render()
{
return app('view')->make('show-name', [
'name' => $this->foo.$this->baz,
]);
}
}
class ComponentWithDirectlyAssignedPropertiesAndMountMethod extends \Livewire\Component
{
public $foo;
public $baz;
public $fooFromMount;
public $bazFromMount;
public function mount($foo, $baz)
{
$this->fooFromMount = $foo;
$this->bazFromMount = $baz;
}
public function render()
{
return app('view')->make('show-name', [
'name' => $this->foo.$this->baz.$this->fooFromMount.$this->bazFromMount,
]);
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Livewire\Mechanisms\Tests;
use Livewire\Livewire;
class DirectlyAssignComponentParametersAsPropertiesUnitTest extends \Tests\TestCase
{
public function test_parameters_are_directly_set_as_properties_without_mount_method()
{
Livewire::test(ComponentWithDirectlyAssignedProperties::class, [
'foo' => 'bar',
'baz' => 'bob',
])->assertSeeText('barbob');
}
public function test_parameters_are_directly_set_as_properties_even_if_mount_method_accepts_them_too()
{
Livewire::test(ComponentWithDirectlyAssignedPropertiesAndMountMethod::class, [
'foo' => 'bar',
'baz' => 'bob',
])->assertSeeText('barbobbarbob');
}
}
class ComponentWithDirectlyAssignedProperties extends \Livewire\Component
{
public $foo;
public $baz;
public function render()
{
return app('view')->make('show-name', [
'name' => $this->foo.$this->baz,
]);
}
}
class ComponentWithDirectlyAssignedPropertiesAndMountMethod extends \Livewire\Component
{
public $foo;
public $baz;
public $fooFromMount;
public $bazFromMount;
public function mount($foo, $baz)
{
$this->fooFromMount = $foo;
$this->bazFromMount = $baz;
}
public function render()
{
return app('view')->make('show-name', [
'name' => $this->foo.$this->baz.$this->fooFromMount.$this->bazFromMount,
]);
}
}
Function Calls
None |
Stats
MD5 | 354d6c7f94a0ea56d536a06ddec30e0c |
Eval Count | 0 |
Decode Time | 82 ms |