Skip to content

Commit 545d382

Browse files
committed
test: update tests that use Customfilter
1 parent f09f221 commit 545d382

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

tests/system/Router/RouterTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,8 @@ public function testRouteWorksWithClassnameFilter()
599599
$this->assertSame('\TestController', $router->controllerName());
600600
$this->assertSame('foo', $router->methodName());
601601
$this->assertSame(Customfilter::class, $router->getFilter());
602+
603+
$this->resetServices();
602604
}
603605

604606
public function testRouteWorksWithMultipleFilters()

tests/system/Test/FilterTestTraitTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,9 @@ public function testCallerUsesClonedInstance()
6666
$caller = $this->getFilterCaller('test-customfilter', 'before');
6767
$result = $caller();
6868

69-
$this->assertObjectNotHasAttribute('url', $this->request);
69+
$this->assertSame('http://hellowworld.com', $result->getBody());
7070

71-
$this->assertObjectHasAttribute('url', $result);
72-
$this->assertSame('http://hellowworld.com', $result->url);
71+
$this->resetServices();
7372
}
7473

7574
public function testGetFiltersForRoute()

0 commit comments

Comments
 (0)