Skip to content

Commit

Permalink
style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Schindler committed Feb 19, 2020
1 parent d353820 commit baf2736
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
36 changes: 18 additions & 18 deletions Tests/ArrayAccess/ArrayAccessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,24 +176,24 @@ public function it_can_write_at_path(): void
/**
* @test
*/
public function it_can_write_value_at_single_path(): void
{
$access = ArrayAccess::create([]);
$newAccess = $access->writeAtPath('new-value', 'Foo');

static::assertSame('new-value', $newAccess->string('Foo'));
}

/**
* @test
*/
public function it_can_write_empty_array(): void
{
$access = ArrayAccess::create([]);
$access = $access->writeAtPath([], '0');

static::assertSame([], $access->array(0));
}
public function it_can_write_value_at_single_path(): void
{
$access = ArrayAccess::create([]);
$newAccess = $access->writeAtPath('new-value', 'Foo');

static::assertSame('new-value', $newAccess->string('Foo'));
}

/**
* @test
*/
public function it_can_write_empty_array(): void
{
$access = ArrayAccess::create([]);
$access = $access->writeAtPath([], '0');

static::assertSame([], $access->array(0));
}

/**
* @test
Expand Down
32 changes: 16 additions & 16 deletions Tests/ArrayAccess/ArrayAccessValidationFailedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ class ArrayAccessValidationFailedTest extends TestCase
/**
* @test
*/
public function it_can_return_errors(): void
{
$error1 = new ValidationError(null, ['e1dp1', 'e1dp2'], [], false, 'kw1');
$error2 = new ValidationError(null, ['e2dp1', 'e2dp2'], [], false, 'kw2');
public function it_can_return_errors(): void
{
$error1 = new ValidationError(null, ['e1dp1', 'e1dp2'], [], false, 'kw1');
$error2 = new ValidationError(null, ['e2dp1', 'e2dp2'], [], false, 'kw2');

$exception = ArrayAccessValidationFailed::withValidationErrors($error1, $error2);
$exception = ArrayAccessValidationFailed::withValidationErrors($error1, $error2);

static::assertSame(
[
'e1dp1' => [
'e1dp2' => 'kw1'
],
'e2dp1' => [
'e2dp2' => 'kw2'
],
],
$exception->errorMapping()->data()
static::assertSame(
[
'e1dp1' => [
'e1dp2' => 'kw1'
],
'e2dp1' => [
'e2dp2' => 'kw2'
],
],
$exception->errorMapping()->data()
);
}
}
}

0 comments on commit baf2736

Please sign in to comment.