Skip to content

Commit

Permalink
Tests: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed Dec 12, 2023
1 parent 6bddff3 commit 700d1f2
Show file tree
Hide file tree
Showing 14 changed files with 4 additions and 25 deletions.
4 changes: 0 additions & 4 deletions tests/.coveralls.yml

This file was deleted.

10 changes: 0 additions & 10 deletions tests/.gitignore

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ test(function (): void {

test(function (): void {
$formatter = new NumberFormatter();
$formatter->setCallback(function ($prefix, $value, $suffix): array {
return [$prefix, $value, $suffix];
});
$formatter->setCallback(fn ($prefix, $value, $suffix): array => [$prefix, $value, $suffix]);

$res = $formatter->format('10.1');
Assert::same('', $res[0]);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ final class FakeFilters implements FiltersProvider
public function getFilters(): array
{
return [
'say' => function ($hi) {
return sprintf('Hi %s!', $hi);
},
'say' => fn ($hi) => sprintf('Hi %s!', $hi),
];
}

Expand Down
File renamed without changes.
7 changes: 2 additions & 5 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<?php declare(strict_types = 1);

use Ninjify\Nunjuck\Environment;
use Contributte\Tester\Environment;

if (@!include __DIR__ . '/../vendor/autoload.php') {
echo 'Install Nette Tester using `composer update --dev`';
exit(1);
}

// Configure environment
Environment::setupTester();
Environment::setupTimezone();
Environment::setupVariables(__DIR__);
Environment::setup(__DIR__);

0 comments on commit 700d1f2

Please sign in to comment.