style: apply fixes from PHP-CS-Fixer

This commit is contained in:
Owen Voke
2022-03-08 10:51:38 +00:00
parent 9cf1005183
commit 3ffed844a6
17 changed files with 33 additions and 33 deletions

View File

@ -8,7 +8,7 @@ use Symfony\Component\Console\Output\ConsoleOutput;
it('has plugin')->assertTrue(class_exists(CoveragePlugin::class));
it('adds coverage if --coverage exist', function () {
$plugin = new CoveragePlugin(new ConsoleOutput());
$plugin = new CoveragePlugin(new ConsoleOutput());
$testSuite = TestSuite::getInstance();
expect($plugin->coverage)->toBeFalse();

View File

@ -12,7 +12,7 @@ class Number
public function __construct(
public int $value
) {
//..
// ..
}
}
@ -21,7 +21,7 @@ class Char
public function __construct(
public string $value
) {
//..
// ..
}
}
@ -30,7 +30,7 @@ class Symbol
public function __construct(
public string $value
) {
//..
// ..
}
}
@ -69,11 +69,11 @@ expect()->pipe('toBe', function ($next, $expected) use ($state) {
assertInstanceOf(Char::class, $expected);
assertEquals($this->value->value, $expected->value);
//returning nothing stops pipeline execution
// returning nothing stops pipeline execution
return;
}
//calling $next(); let the pipeline to keep running
// calling $next(); let the pipeline to keep running
$next();
});

View File

@ -5,7 +5,7 @@ use PHPUnit\Framework\ExpectationFailedException;
expect(true)->toBeTrue()->and(false)->toBeFalse();
test('strict comparisons', function () {
$nuno = new stdClass();
$nuno = new stdClass();
$dries = new stdClass();
expect($nuno)->toBe($nuno)->not->toBe($dries);

View File

@ -3,24 +3,24 @@
use PHPUnit\Framework\ExpectationFailedException;
test('pass', function () {
$object = new stdClass();
$object = new stdClass();
$object->name = 'Jhon';
$object->age = 21;
$object->age = 21;
expect($object)->toHaveProperties(['name', 'age']);
});
test('failures', function () {
$object = new stdClass();
$object = new stdClass();
$object->name = 'Jhon';
expect($object)->toHaveProperties(['name', 'age']);
})->throws(ExpectationFailedException::class);
test('not failures', function () {
$object = new stdClass();
$object = new stdClass();
$object->name = 'Jhon';
$object->age = 21;
$object->age = 21;
expect($object)->not->toHaveProperties(['name', 'age']);
})->throws(ExpectationFailedException::class);

View File

@ -3,9 +3,9 @@
use PHPUnit\Framework\ExpectationFailedException;
beforeEach(function () {
$this->unlessObject = new stdClass();
$this->unlessObject = new stdClass();
$this->unlessObject->trueValue = true;
$this->unlessObject->foo = 'foo';
$this->unlessObject->foo = 'foo';
});
it('pass', function () {

View File

@ -3,9 +3,9 @@
use PHPUnit\Framework\ExpectationFailedException;
beforeEach(function () {
$this->whenObject = new stdClass();
$this->whenObject = new stdClass();
$this->whenObject->trueValue = true;
$this->whenObject->foo = 'foo';
$this->whenObject->foo = 'foo';
});
it('pass', function () {