Skip to content

Commit

Permalink
Revert "PHP-CS-Fixer"
Browse files Browse the repository at this point in the history
This reverts commit b809675
  • Loading branch information
DamienHarper committed Aug 19, 2019
1 parent b809675 commit 4846d24
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
16 changes: 8 additions & 8 deletions tests/DoctrineAuditBundle/AuditManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function testInsert(): void
$this->assertEquals(1, $entry->getUserId(), 'audit entry blame_id is ok.');
$this->assertSame('dark.vador', $entry->getUsername(), 'audit entry blame_user is ok.');
$this->assertSame('1.2.3.4', $entry->getIp(), 'audit entry IP is ok.');
$this->assertSame([
$this->assertEquals([
'fullname' => [
'old' => null,
'new' => 'John Doe',
Expand Down Expand Up @@ -95,7 +95,7 @@ public function testUpdate(): void
$this->assertEquals(1, $entry->getUserId(), 'audit entry blame_id is ok.');
$this->assertSame('dark.vador', $entry->getUsername(), 'audit entry blame_user is ok.');
$this->assertSame('1.2.3.4', $entry->getIp(), 'audit entry IP is ok.');
$this->assertSame([
$this->assertEquals([
'fullname' => [
'old' => 'John Doe',
'new' => 'Dark Vador',
Expand Down Expand Up @@ -133,7 +133,7 @@ public function testRemove(): void
$this->assertEquals(1, $entry->getUserId(), 'audit entry blame_id is ok.');
$this->assertSame('dark.vador', $entry->getUsername(), 'audit entry blame_user is ok.');
$this->assertSame('1.2.3.4', $entry->getIp(), 'audit entry IP is ok.');
$this->assertSame([
$this->assertEquals([
'label' => Author::class.'#1',
'class' => Author::class,
'table' => $em->getClassMetadata(Author::class)->getTableName(),
Expand Down Expand Up @@ -197,7 +197,7 @@ public function testAssociateOneToMany(): void
$this->assertEquals(1, $entry->getUserId(), 'audit entry blame_id is ok.');
$this->assertSame('dark.vador', $entry->getUsername(), 'audit entry blame_user is ok.');
$this->assertSame('1.2.3.4', $entry->getIp(), 'audit entry IP is ok.');
$this->assertSame([
$this->assertEquals([
'source' => [
'label' => Author::class.'#1',
'class' => Author::class,
Expand Down Expand Up @@ -266,7 +266,7 @@ public function testDissociateOneToMany(): void
$this->assertEquals(1, $entry->getUserId(), 'audit entry blame_id is ok.');
$this->assertSame('dark.vador', $entry->getUsername(), 'audit entry blame_user is ok.');
$this->assertSame('1.2.3.4', $entry->getIp(), 'audit entry IP is ok.');
$this->assertSame([
$this->assertEquals([
'source' => [
'label' => Author::class.'#1',
'class' => Author::class,
Expand Down Expand Up @@ -382,7 +382,7 @@ public function testAssociateManyToMany(): void
$this->assertEquals(1, $entry->getUserId(), 'audit entry blame_id is ok.');
$this->assertSame('dark.vador', $entry->getUsername(), 'audit entry blame_user is ok.');
$this->assertSame('1.2.3.4', $entry->getIp(), 'audit entry IP is ok.');
$this->assertSame([
$this->assertEquals([
'source' => [
'label' => (string) $post,
'class' => Post::class,
Expand All @@ -404,7 +404,7 @@ public function testAssociateManyToMany(): void
$this->assertEquals(1, $entry->getUserId(), 'audit entry blame_id is ok.');
$this->assertSame('dark.vador', $entry->getUsername(), 'audit entry blame_user is ok.');
$this->assertSame('1.2.3.4', $entry->getIp(), 'audit entry IP is ok.');
$this->assertSame([
$this->assertEquals([
'source' => [
'label' => (string) $post,
'class' => Post::class,
Expand Down Expand Up @@ -523,7 +523,7 @@ public function testDissociateManyToMany(): void
$this->assertEquals(1, $entry->getUserId(), 'audit entry blame_id is ok.');
$this->assertSame('dark.vador', $entry->getUsername(), 'audit entry blame_user is ok.');
$this->assertSame('1.2.3.4', $entry->getIp(), 'audit entry IP is ok.');
$this->assertSame([
$this->assertEquals([
'source' => [
'label' => 'First post',
'class' => Post::class,
Expand Down
60 changes: 30 additions & 30 deletions tests/DoctrineAuditBundle/EventSubscriber/AuditSubscriberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function testInsertWithoutRelation(): void
$this->assertEquals(1, $entry->getUserId(), 'audit entry blame_id is ok.');
$this->assertSame('dark.vador', $entry->getUsername(), 'audit entry blame_user is ok.');
$this->assertSame('1.2.3.4', $entry->getIp(), 'audit entry IP is ok.');
$this->assertSame([
$this->assertEquals([
'fullname' => [
'old' => null,
'new' => 'John Doe',
Expand Down Expand Up @@ -93,7 +93,7 @@ public function testUpdateWithoutRelation(): void
$this->assertEquals(1, $entry->getUserId(), 'audit entry blame_id is ok.');
$this->assertSame('dark.vador', $entry->getUsername(), 'audit entry blame_user is ok.');
$this->assertSame('1.2.3.4', $entry->getIp(), 'audit entry IP is ok.');
$this->assertSame([
$this->assertEquals([
'fullname' => [
'old' => null,
'new' => 'John',
Expand All @@ -110,7 +110,7 @@ public function testUpdateWithoutRelation(): void
$this->assertEquals(1, $entry->getUserId(), 'audit entry blame_id is ok.');
$this->assertSame('dark.vador', $entry->getUsername(), 'audit entry blame_user is ok.');
$this->assertSame('1.2.3.4', $entry->getIp(), 'audit entry IP is ok.');
$this->assertSame([
$this->assertEquals([
'fullname' => [
'old' => 'John',
'new' => 'John Doe',
Expand Down Expand Up @@ -143,7 +143,7 @@ public function testRemoveWithoutRelation(): void
$audits = $reader->getAudits(Author::class);
$afterCount = \count($audits);

$this->assertSame($beforeCount + 1, $afterCount, 'removing an entity (no relation set) adds 1 entry in the audit table.');
$this->assertEquals($beforeCount + 1, $afterCount, 'removing an entity (no relation set) adds 1 entry in the audit table.');

/** @var AuditEntry $entry */
$entry = $audits[0];
Expand All @@ -152,7 +152,7 @@ public function testRemoveWithoutRelation(): void
$this->assertEquals(1, $entry->getUserId(), 'audit entry blame_id is ok.');
$this->assertSame('dark.vador', $entry->getUsername(), 'audit entry blame_user is ok.');
$this->assertSame('1.2.3.4', $entry->getIp(), 'audit entry IP is ok.');
$this->assertSame([
$this->assertEquals([
'label' => Author::class.'#1',
'class' => Author::class,
'table' => $em->getClassMetadata(Author::class)->getTableName(),
Expand All @@ -176,7 +176,7 @@ public function testAuditingIntValues(): void

$audits = $reader->getAudits(DummyEntity::class);
$this->assertSame(AuditReader::INSERT, $audits[0]->getType(), 'AuditReader::INSERT operation.');
$this->assertSame([
$this->assertEquals([
'label' => [
'old' => null,
'new' => 'int: null->17',
Expand All @@ -194,7 +194,7 @@ public function testAuditingIntValues(): void

$audits = $reader->getAudits(DummyEntity::class);
$this->assertSame(AuditReader::UPDATE, $audits[0]->getType(), 'AuditReader::UPDATE operation.');
$this->assertSame([
$this->assertEquals([
'label' => [
'old' => 'int: null->17',
'new' => 'int: 17->null',
Expand All @@ -212,7 +212,7 @@ public function testAuditingIntValues(): void

$audits = $reader->getAudits(DummyEntity::class);
$this->assertSame(AuditReader::UPDATE, $audits[0]->getType(), 'AuditReader::UPDATE operation.');
$this->assertSame([
$this->assertEquals([
'label' => [
'old' => 'int: 17->null',
'new' => 'int: null->24',
Expand All @@ -230,7 +230,7 @@ public function testAuditingIntValues(): void

$audits = $reader->getAudits(DummyEntity::class);
$this->assertSame(AuditReader::UPDATE, $audits[0]->getType(), 'AuditReader::UPDATE operation.');
$this->assertSame([
$this->assertEquals([
'label' => [
'old' => 'int: null->24',
'new' => 'int: 24->"24"',
Expand All @@ -244,7 +244,7 @@ public function testAuditingIntValues(): void

$audits = $reader->getAudits(DummyEntity::class);
$this->assertSame(AuditReader::UPDATE, $audits[0]->getType(), 'AuditReader::UPDATE operation.');
$this->assertSame([
$this->assertEquals([
'label' => [
'old' => 'int: 24->"24"',
'new' => 'int: "24"->24',
Expand All @@ -258,7 +258,7 @@ public function testAuditingIntValues(): void

$audits = $reader->getAudits(DummyEntity::class);
$this->assertSame(AuditReader::UPDATE, $audits[0]->getType(), 'AuditReader::UPDATE operation.');
$this->assertSame([
$this->assertEquals([
'label' => [
'old' => 'int: "24"->24',
'new' => 'int: 24->24.0',
Expand All @@ -272,7 +272,7 @@ public function testAuditingIntValues(): void

$audits = $reader->getAudits(DummyEntity::class);
$this->assertSame(AuditReader::UPDATE, $audits[0]->getType(), 'AuditReader::UPDATE operation.');
$this->assertSame([
$this->assertEquals([
'label' => [
'old' => 'int: 24->24.0',
'new' => 'int: 24->null',
Expand Down Expand Up @@ -300,7 +300,7 @@ public function testAuditingDecimalValues(): void

$audits = $reader->getAudits(DummyEntity::class);
$this->assertSame(AuditReader::INSERT, $audits[0]->getType(), 'AuditReader::INSERT operation.');
$this->assertSame([
$this->assertEquals([
'label' => [
'old' => null,
'new' => 'decimal: null->10.2',
Expand All @@ -318,7 +318,7 @@ public function testAuditingDecimalValues(): void

$audits = $reader->getAudits(DummyEntity::class);
$this->assertSame(AuditReader::UPDATE, $audits[0]->getType(), 'AuditReader::UPDATE operation.');
$this->assertSame([
$this->assertEquals([
'label' => [
'old' => 'decimal: null->10.2',
'new' => 'decimal: 10.2->"10.2"',
Expand All @@ -341,7 +341,7 @@ public function testAuditingBooleanValues(): void

$audits = $reader->getAudits(DummyEntity::class);
$this->assertSame(AuditReader::INSERT, $audits[0]->getType(), 'AuditReader::INSERT operation.');
$this->assertSame([
$this->assertEquals([
'label' => [
'old' => null,
'new' => 'bool: null',
Expand All @@ -355,7 +355,7 @@ public function testAuditingBooleanValues(): void

$audits = $reader->getAudits(DummyEntity::class);
$this->assertSame(AuditReader::UPDATE, $audits[0]->getType(), 'AuditReader::UPDATE operation.');
$this->assertSame([
$this->assertEquals([
'label' => [
'old' => 'bool: null',
'new' => 'bool: null->true',
Expand All @@ -373,7 +373,7 @@ public function testAuditingBooleanValues(): void

$audits = $reader->getAudits(DummyEntity::class);
$this->assertSame(AuditReader::UPDATE, $audits[0]->getType(), 'AuditReader::UPDATE operation.');
$this->assertSame([
$this->assertEquals([
'label' => [
'old' => 'bool: null->true',
'new' => 'bool: true->null',
Expand All @@ -391,7 +391,7 @@ public function testAuditingBooleanValues(): void

$audits = $reader->getAudits(DummyEntity::class);
$this->assertSame(AuditReader::UPDATE, $audits[0]->getType(), 'AuditReader::UPDATE operation.');
$this->assertSame([
$this->assertEquals([
'label' => [
'old' => 'bool: true->null',
'new' => 'bool: null->false',
Expand All @@ -409,7 +409,7 @@ public function testAuditingBooleanValues(): void

$audits = $reader->getAudits(DummyEntity::class);
$this->assertSame(AuditReader::UPDATE, $audits[0]->getType(), 'AuditReader::UPDATE operation.');
$this->assertSame([
$this->assertEquals([
'label' => [
'old' => 'bool: null->false',
'new' => 'bool: false->null',
Expand Down Expand Up @@ -437,7 +437,7 @@ public function testAuditingPhpArrayValues(): void

$audits = $reader->getAudits(DummyEntity::class);
$this->assertSame(AuditReader::INSERT, $audits[0]->getType(), 'AuditReader::INSERT operation.');
$this->assertSame([
$this->assertEquals([
'label' => [
'old' => null,
'new' => 'php_array: null->[R1, R2]',
Expand Down Expand Up @@ -465,7 +465,7 @@ public function testAuditingJsonArrayValues(): void

$audits = $reader->getAudits(DummyEntity::class);
$this->assertSame(AuditReader::INSERT, $audits[0]->getType(), 'AuditReader::INSERT operation.');
$this->assertSame([
$this->assertEquals([
'label' => [
'old' => null,
'new' => 'json_array: null->[R1, R2]',
Expand Down Expand Up @@ -493,7 +493,7 @@ public function testAuditingSimpleArrayValues(): void

$audits = $reader->getAudits(DummyEntity::class);
$this->assertSame(AuditReader::INSERT, $audits[0]->getType(), 'AuditReader::INSERT operation.');
$this->assertSame([
$this->assertEquals([
'label' => [
'old' => null,
'new' => 'simple_array: null->[R1, R2]',
Expand Down Expand Up @@ -551,7 +551,7 @@ public function testOneToManyAssociate(): void
$this->assertSame(AuditReader::ASSOCIATE, $audits[$i++]->getType(), 'entry'.$i.' is an AuditReader::ASSOCIATE operation.');
$this->assertSame(AuditReader::INSERT, $audits[$i++]->getType(), 'entry'.$i.' is an AuditReader::INSERT operation.');

$this->assertSame([
$this->assertEquals([
'source' => [
'label' => Author::class.'#1',
'class' => Author::class,
Expand All @@ -566,7 +566,7 @@ public function testOneToManyAssociate(): void
],
], $audits[0]->getDiffs(), 'relation ok.');

$this->assertSame([
$this->assertEquals([
'source' => [
'label' => Author::class.'#1',
'class' => Author::class,
Expand Down Expand Up @@ -634,7 +634,7 @@ public function testOneToManyDissociate(): void
$this->assertSame(AuditReader::ASSOCIATE, $audits[$i++]->getType(), 'entry'.$i.' is an AuditReader::ASSOCIATE operation.');
$this->assertSame(AuditReader::INSERT, $audits[$i++]->getType(), 'entry'.$i.' is an AuditReader::INSERT operation.');

$this->assertSame([
$this->assertEquals([
'source' => [
'label' => Author::class.'#1',
'class' => Author::class,
Expand All @@ -649,7 +649,7 @@ public function testOneToManyDissociate(): void
],
], $audits[0]->getDiffs(), 'relation ok.');

$this->assertSame([
$this->assertEquals([
'source' => [
'label' => Author::class.'#1',
'class' => Author::class,
Expand Down Expand Up @@ -718,7 +718,7 @@ public function testManyToManyAssociate(): void
$this->assertSame(AuditReader::ASSOCIATE, $audits[$i++]->getType(), 'entry'.$i.' is an AuditReader::ASSOCIATE operation.');
$this->assertSame(AuditReader::INSERT, $audits[$i++]->getType(), 'entry'.$i.' is an AuditReader::INSERT operation.');

$this->assertSame([
$this->assertEquals([
'source' => [
'label' => (string) $post,
'class' => Post::class,
Expand All @@ -734,7 +734,7 @@ public function testManyToManyAssociate(): void
'table' => 'post__tag',
], $audits[0]->getDiffs(), 'relation ok.');

$this->assertSame([
$this->assertEquals([
'source' => [
'label' => (string) $post,
'class' => Post::class,
Expand All @@ -750,7 +750,7 @@ public function testManyToManyAssociate(): void
'table' => 'post__tag',
], $audits[1]->getDiffs(), 'relation ok.');

$this->assertSame([
$this->assertEquals([
'source' => [
'label' => (string) $post,
'class' => Post::class,
Expand Down Expand Up @@ -824,7 +824,7 @@ public function testManyToManyDissociate(): void
$this->assertSame(AuditReader::ASSOCIATE, $audits[$i++]->getType(), 'entry'.$i.' is an AuditReader::ASSOCIATE operation.');
$this->assertSame(AuditReader::INSERT, $audits[$i++]->getType(), 'entry'.$i.' is an AuditReader::INSERT operation.');

$this->assertSame([
$this->assertEquals([
'source' => [
'label' => (string) $post,
'class' => Post::class,
Expand Down

0 comments on commit 4846d24

Please sign in to comment.