Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use PHPUnit 10 syntax #65

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions test/Page/MvcTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
*/
class MvcTest extends TestCase
{
private RegexRoute $route;
private TreeRouteStack $router;
private RouteMatch $routeMatch;

protected function setUp(): void
{
$this->route = new RegexRoute(
Expand Down
10 changes: 4 additions & 6 deletions test/Service/AbstractNavigationFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
*/
class AbstractNavigationFactoryTest extends TestCase
{
private TestAsset\TestNavigationFactory $factory;

public function setUp(): void
{
$this->factory = new TestAsset\TestNavigationFactory();
Expand Down Expand Up @@ -54,17 +56,13 @@ public function testCanCreateNavigationInstanceV2()
$mvcEventStub->setRouteMatch(new Router\RouteMatch([]));
$mvcEventStub->setRouter(new Router\Http\TreeRouteStack());

$applicationMock = $this->getMockBuilder(Application::class)
->disableOriginalConstructor()
->getMock();
$applicationMock = $this->createMock(Application::class);

$applicationMock->expects($this->any())
->method('getMvcEvent')
->willReturn($mvcEventStub);

$serviceManagerMock = $this->getMockBuilder(ServiceManager::class)
->disableOriginalConstructor()
->getMock();
$serviceManagerMock = $this->createMock(ServiceManager::class);

$serviceManagerMock->expects($this->any())
->method('get')
Expand Down
5 changes: 5 additions & 0 deletions test/ServiceFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Laminas\Router\RouteMatch;
use Laminas\Router\RouteStackInterface;
use Laminas\ServiceManager\ServiceManager;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;

Expand All @@ -29,6 +30,10 @@ class ServiceFactoryTest extends TestCase
/** @var ServiceManager */
protected $serviceManager;

private MockObject $router;
private MockObject $request;
private MvcEvent $mvcEvent;

/**
* Prepares the environment before running a test.
*/
Expand Down