Skip to content

Commit

Permalink
used Tester 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Mar 8, 2023
1 parent 8660561 commit 4048b01
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"nette/utils": "^4.0"
},
"require-dev": {
"nette/tester": "^2.4",
"nette/tester": "^2.5",
"nette/di": "^3.1 || ^4.0",
"mockery/mockery": "^1.4.3",
"tracy/tracy": "^2.8",
Expand Down
2 changes: 1 addition & 1 deletion tests/Database/Explorer/Explorer.cache.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ test('Testing GroupedSelection reinvalidation caching', function () use ($explor
});


before(function () use ($cacheMemoryStorage) {
setup(function () use ($cacheMemoryStorage) {
$cacheMemoryStorage->clean([Nette\Caching\Cache::ALL => true]);
});

Expand Down
19 changes: 1 addition & 18 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// configure environment
Tester\Environment::setup();
date_default_timezone_set('Europe/Prague');
Tester\Environment::setupFunctions();


function getTempDir(): string
Expand All @@ -22,20 +22,3 @@ function getTempDir(): string
@mkdir($dir);
return $dir;
}


function before(?Closure $function = null)
{
static $val;
if (!func_num_args()) {
return $val ? $val() : null;
}
$val = $function;
}


function test(string $title, Closure $function): void
{
before();
$function();
}

0 comments on commit 4048b01

Please sign in to comment.