Skip to content

Commit

Permalink
pint
Browse files Browse the repository at this point in the history
  • Loading branch information
markhuot committed Nov 29, 2023
1 parent c6d6f5e commit 7ca99fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/base/SlotDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
use markhuot\keystone\models\Component;
use Twig\Markup;

use function markhuot\craftpest\helpers\test\dd;

class SlotDefinition
{
public function __construct(
Expand Down Expand Up @@ -107,8 +105,7 @@ public function __toString(): string
// exception is usually just that ->getSlot is not a string
if ($e->getPrevious()) {
throw $e->getPrevious();
}
else {
} else {
throw $e;
}
}
Expand Down
6 changes: 2 additions & 4 deletions tests/components/TemplateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
use markhuot\craftpest\web\TestableResponse;
use markhuot\keystone\models\Component;

use function markhuot\craftpest\helpers\test\dd;

it('renders template component', function () {
$component = Component::factory()->type('keystone/template')->create();
$component->data->merge(['template' => 'basic-template'])->save();

expect(trim($component->render()))->toBe('foo');
});

Expand All @@ -26,4 +24,4 @@
expect((new TestableResponse(['content' => $html]))->querySelector('a'))
->getNodeOrNodes(fn ($node) => $node->getNode(0)->getAttribute('href'))->toBe($entry->uri)
->getText()->toBe($entry->title);
});
});

0 comments on commit 7ca99fa

Please sign in to comment.