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

New methods for question and template testing #15

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Prev Previous commit
added assertButtonCount to ElementTester
KarlisJ committed Oct 28, 2017
commit 97fc8dd0ec86a1d6948d10216d5bd0ddb18ecb82
7 changes: 7 additions & 0 deletions src/Testing/ElementTester.php
Original file line number Diff line number Diff line change
@@ -86,6 +86,13 @@ public function assertImageIsNot($image_url)
return $this;
}

public function assertButtonCount($count)
{
PHPUnit::assertCount($count, $this->element['buttons']);

return $this;
}

public function assertButton($index, $closure)
{
$button = $this->element['buttons'][$index];