Skip to content

Commit

Permalink
Upgrade dev deps (#85)
Browse files Browse the repository at this point in the history
* Set default branch to main

* Upgrade dev dependencies and fix tests
  • Loading branch information
tattali authored Dec 7, 2024
1 parent 586fb52 commit 63988af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
"symfony/framework-bundle": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "^11.0",
"phpunit/phpunit": "^11.2",
"symfony/dotenv": "^7.0",
"symfony/phpunit-bridge": "^7.0",
"symfony/yaml": "^7.0",
"friendsofphp/php-cs-fixer": "^3.54",
"phpstan/phpstan": "^1.10"
"friendsofphp/php-cs-fixer": "^3.65",
"phpstan/phpstan": "^2.0"
},
"suggest": {
"symfony/orm-pack": "To support Doctrine ORM and Migration.",
Expand Down
18 changes: 10 additions & 8 deletions tests/Controller/CalendarControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,22 @@

final class CalendarControllerTest extends TestCase
{
private Event&MockObject $event;
private EventDispatcherInterface&MockObject $eventDispatcher;
private SerializerInterface&MockObject $serializer;
private SetDataEvent&MockObject $calendarEvent;
private Request&MockObject $request;
private MockObject&Request $request;
private MockObject&SetDataEvent $calendarEvent;
private MockObject&Event $event;

private MockObject&EventDispatcherInterface $eventDispatcher;
private MockObject&SerializerInterface $serializer;

private CalendarController $controller;

protected function setUp(): void
{
$this->request = $this->createMock(Request::class);
$this->calendarEvent = $this->createMock(SetDataEvent::class);
$this->event = $this->createMock(Event::class);

$this->eventDispatcher = $this->createMock(EventDispatcherInterface::class);
$this->request = $this->createMock(Request::class);
$this->serializer = $this->createMock(SerializerInterface::class);

$this->controller = new CalendarController(
Expand All @@ -56,7 +58,7 @@ public function testItProvidesAnEventsFeedForACalendar(): void

$this->eventDispatcher->method('dispatch')
->with(self::isInstanceOf(SetDataEvent::class))
->willReturnReference($this->calendarEvent)
->willReturn($this->calendarEvent)
;

$data = json_encode([
Expand Down Expand Up @@ -103,7 +105,7 @@ public function testItNotFindAnyEvents(): void

$this->eventDispatcher->method('dispatch')
->with(self::isInstanceOf(SetDataEvent::class))
->willReturnReference($this->calendarEvent)
->willReturn($this->calendarEvent)
;

$data = '';
Expand Down

0 comments on commit 63988af

Please sign in to comment.