Skip to content

Commit

Permalink
applying php-cs-fixer with updated ruleset
Browse files Browse the repository at this point in the history
  • Loading branch information
SignpostMarv committed Jan 19, 2020
1 parent 2a95f26 commit 909e9c3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions Tests/DaftTypedObjectTest.php
Expand Up @@ -14,7 +14,7 @@

class DaftTypedObjectTest extends Base
{
public function testPropertyValueToScalarOrNullFailsWithDateTimeImmutable(
public function test_property_value_to_scalar_or_null_fails_with_date_time_immutable(
) : void {
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage(sprintf(
Expand Down Expand Up @@ -91,7 +91,7 @@ public function dataProviderImplementations() : Generator
* @param T $args
* @param S $expected
*/
public function testJsonSerialize(
public function test_json_serialize(
string $type,
array $args,
array $expected
Expand Down Expand Up @@ -161,7 +161,7 @@ final public function dataProviderMutableImplementationsWithNonNullProperty(
* @param class-string<DaftTypedObject> $type
* @param array<string, scalar|array|object|null> $args
*/
public function testMutableSetSucceeds(
public function test_mutable_set_succeeds(
string $type,
string $property,
array $args
Expand All @@ -180,8 +180,8 @@ public function testMutableSetSucceeds(

$object->$property = $value;

$this->assertNotSame($was, $object->$property);
$this->assertSame($value, $object->$property);
static::assertNotSame($was, $object->$property);
static::assertSame($value, $object->$property);
}

/**
Expand Down Expand Up @@ -215,7 +215,7 @@ final public function dataProviderImplementationsWithNonNullableProperty(
* @param class-string<DaftTypedObject> $type
* @param array<string, scalar|array|object|null> $args
*/
public function testIsset(
public function test_isset(
string $type,
string $property,
array $args
Expand Down
24 changes: 12 additions & 12 deletions Tests/FixturesTest.php
Expand Up @@ -11,39 +11,39 @@

class FixturesTest extends Base
{
public function testMutable() : void
public function test_mutable() : void
{
$a = new Fixtures\Mutable([
'id' => 1,
'name' => 'foo',
]);

$this->assertSame(1, $a->id);
$this->assertSame('foo', $a->name);
static::assertSame(1, $a->id);
static::assertSame('foo', $a->name);
}

public function testMutableWithNullables() : void
public function test_mutable_with_nullables() : void
{
$a = new Fixtures\MutableWithNullables([
'id' => 1,
'name' => 'foo',
'date' => null,
]);

$this->assertSame(1, $a->id);
$this->assertSame('foo', $a->name);
$this->assertNull($a->date);
static::assertSame(1, $a->id);
static::assertSame('foo', $a->name);
static::assertNull($a->date);

$b = new Fixtures\MutableWithNullables([
'id' => 1,
'name' => 'foo',
'date' => new DateTimeImmutable((string) date('Y-m-d', 0)),
]);

$this->assertSame(1, $b->id);
$this->assertSame('foo', $b->name);
$this->assertNotNull($b->date);
$this->assertSame('1970-01-01', $b->date->format('Y-m-d'));
$this->assertSame('00:00:00', $b->date->format('H:i:s'));
static::assertSame(1, $b->id);
static::assertSame('foo', $b->name);
static::assertNotNull($b->date);
static::assertSame('1970-01-01', $b->date->format('Y-m-d'));
static::assertSame('00:00:00', $b->date->format('H:i:s'));
}
}

0 comments on commit 909e9c3

Please sign in to comment.