Skip to content

Commit

Permalink
Add phpunit v11 support (#2202)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek authored Apr 9, 2024
1 parent 9e20f56 commit 3160073
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-strict-rules": "^1.3",
"phpunit/phpunit": "^9.5.5 || ^10.0",
"phpunit/phpunit": "^9.5.5 || ^10.0 || ^11.0",
"symfony/process": "^4.4.30 || ^5.3.7 || ^6.0"
},
"conflict": {
Expand Down
2 changes: 1 addition & 1 deletion tests/ButtonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ public function testButtonIcon(): void
{
$button = new Button(['Load', 'icon' => 'pause']);
$button->setApp($this->createApp());
$button->renderToHtml();
$button->renderAll();
}
}
8 changes: 4 additions & 4 deletions tests/FormTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected function assertFormSubmit(\Closure $createFormFx, array $postData, ?\C
}
});

$form->renderToHtml();
$form->renderAll();
$res = AppFormTestMock::assertInstanceOf($form->getApp())->output;

if ($checkExpectedErrorsFx !== null) {
Expand Down Expand Up @@ -377,7 +377,7 @@ public function testCheckboxWithNonBooleanException(): void

$this->expectException(Exception::class);
$this->expectExceptionMessage('Checkbox form control requires field with boolean type');
$input->renderToHtml();
$input->renderAll();
}

public function testUploadNoUploadCallbackException(): void
Expand All @@ -396,7 +396,7 @@ public function testUploadNoUploadCallbackException(): void

$this->expectException(Exception::class);
$this->expectExceptionMessage('Missing onUpload callback');
$input->renderToHtml();
$input->renderAll();
}

public function testUploadNoDeleteCallbackException(): void
Expand All @@ -415,7 +415,7 @@ public function testUploadNoDeleteCallbackException(): void

$this->expectException(Exception::class);
$this->expectExceptionMessage('Missing onDelete callback');
$input->renderToHtml();
$input->renderAll();
}
}

Expand Down
6 changes: 3 additions & 3 deletions tests/JsIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function testUniqueId1(): void
{
$v = new Button(['icon' => 'pencil']);
$v->setApp($this->createApp());
$v->renderToHtml();
$v->renderAll();

self::assertNotEmpty($v->icon);
self::assertNotEmpty($v->icon->name); // @phpstan-ignore-line
Expand All @@ -32,7 +32,7 @@ public function testUniqueId2(): void
$b1 = Button::addTo($v);
$b2 = Button::addTo($v);
$v->setApp($this->createApp());
$v->renderToHtml();
$v->renderAll();

self::assertNotSame($b1->name, $b2->name);
}
Expand All @@ -42,7 +42,7 @@ public function testChainFalse(): void
$v = new Button(['name' => 'b']);
$j = $v->js()->hide();
$v->setApp($this->createApp());
$v->renderToHtml();
$v->renderAll();

self::assertSame('$(\'#b\').hide()', $j->jsRender());
}
Expand Down
4 changes: 2 additions & 2 deletions tests/RenderTreeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function testBasic(): void
{
$view = new View();
$view->setApp($this->createApp());
$view->renderToHtml();
$view->renderAll();

$view->getApp();
self::assertNotNull($view->template);
Expand All @@ -30,7 +30,7 @@ public function testBasicNested(): void
$view = new View();
$view2 = View::addTo($view);
$view->setApp($this->createApp());
$view->renderToHtml();
$view->renderAll();

$view2->getApp();
self::assertNotNull($view2->template);
Expand Down
2 changes: 1 addition & 1 deletion tests/TableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function testAddColumnWithoutModel(): void
$table->addColumn('eight', [Table\Column\Link::class, ['id' => 3]]);
$table->addColumn('nine');

$table->renderToHtml();
$table->renderAll();
}

public function testAddColumnAlreadyExistsException(): void
Expand Down
2 changes: 1 addition & 1 deletion tests/ViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function testAddAfterRenderException(): void
$v->set('foo');

$v->setApp($this->createApp());
$v->renderToHtml();
$v->renderAll();

$this->expectException(Exception::class);
View::addTo($v);
Expand Down

0 comments on commit 3160073

Please sign in to comment.