Skip to content

Commit

Permalink
simplify testPull230 test
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Dec 27, 2021
1 parent 033699a commit 848772c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tests/CallbackTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,23 +225,21 @@ public function testVirtualPageCustomTrigger(): void
$this->assertSame(25, $var);
}

public $var;

public function callPull230()
{
$this->var = 26;
}
/** @var int */
private $varPull230;

public function testPull230(): void
{
$vp = VirtualPage::addTo($this->app);

$this->simulateCallbackTriggering($vp);

$vp->set(\Closure::fromCallable([$this, 'callPull230']));
$vp->set(function () {
$this->varPull230 = 26;
});

$this->expectOutputRegex('/^..DOCTYPE/');
$this->app->run();
$this->assertSame(26, $this->var);
$this->assertSame(26, $this->varPull230);
}
}

0 comments on commit 848772c

Please sign in to comment.