Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dimtrovich committed Jan 29, 2024
1 parent fea1d37 commit 57b19c5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions spec/system/framework/Router/RouteBuilder.spec.php
Expand Up @@ -181,11 +181,11 @@

expect($this->routes->getRoutes())->toBe([
'photos' => '\Photos::index',
'photos/show/(.*)' => '\Photos::show/$1',
'photos/(.*)' => '\Photos::show/$1',
'photos/new' => '\Photos::new',
'photos/edit/(.*)' => '\Photos::edit/$1',
'photos/remove/(.*)' => '\Photos::remove/$1',
'photos/show/(.*)' => '\Photos::show/$1',
'photos/(.*)' => '\Photos::show/$1',
]);
});
});
Expand Down
8 changes: 4 additions & 4 deletions spec/system/framework/Router/RouterCollection.spec.php
Expand Up @@ -574,22 +574,22 @@ static function ($routes): void {

expect($routes->getRoutes())->toBe([
'photos' => '\Photos::index',
'photos/show/(.*)' => '\Photos::show/$1',
'photos/(.*)' => '\Photos::show/$1',
'photos/new' => '\Photos::new',
'photos/edit/(.*)' => '\Photos::edit/$1',
'photos/remove/(.*)' => '\Photos::remove/$1',
'photos/show/(.*)' => '\Photos::show/$1',
'photos/(.*)' => '\Photos::show/$1',
]);

$routes = getCollector();
$routes->setHTTPVerb('post');
$routes->presenter('photos');

expect($routes->getRoutes())->toBe([
'photos/create' => '\Photos::create',
'photos' => '\Photos::create',
'photos/update/(.*)' => '\Photos::update/$1',
'photos/delete/(.*)' => '\Photos::delete/$1',
'photos/create' => '\Photos::create',
'photos' => '\Photos::create',
]);
});

Expand Down
7 changes: 4 additions & 3 deletions spec/system/framework/Views/View.spec.php
Expand Up @@ -244,10 +244,11 @@

$view->withErrors('invalid error');

$shared = ReflectionHelper::getPrivateProperty($view, 'shared');
$adapter = ReflectionHelper::getPrivateProperty($view, 'adapter');
$tempData = ReflectionHelper::getPrivateProperty($adapter, 'tempData');

expect($shared)->toContainKey('errors');
expect($shared['errors'])->toBeAnInstanceOf(ErrorBag::class);
expect($tempData)->toContainKey('errors');
expect($tempData['errors'])->toBeAnInstanceOf(ErrorBag::class);
});

it('first', function () {
Expand Down

0 comments on commit 57b19c5

Please sign in to comment.