Skip to content

Commit

Permalink
Merge pull request #620 from mnabialek/5.0-phpunit-8
Browse files Browse the repository at this point in the history
Avoid deprecation messages on PHPUnit 8
  • Loading branch information
driesvints authored Mar 1, 2019
2 parents 00276ad + 1985616 commit 6d6ab62
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/Concerns/MakesAssertions.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ public function assertDontSeeIn($selector, $text)
*/
public function assertSourceHas($code)
{
PHPUnit::assertContains(
$code, $this->driver->getPageSource(),
PHPUnit::assertTrue(
Str::contains($this->driver->getPageSource(), $code),
"Did not find expected source code [{$code}]"
);

Expand All @@ -221,8 +221,8 @@ public function assertSourceHas($code)
*/
public function assertSourceMissing($code)
{
PHPUnit::assertNotContains(
$code, $this->driver->getPageSource(),
PHPUnit::assertFalse(
Str::contains($this->driver->getPageSource(), $code),
"Found unexpected source code [{$code}]"
);

Expand Down Expand Up @@ -737,7 +737,9 @@ public function assertVueIsNot($key, $value, $componentSelector = null)
*/
public function assertVueContains($key, $value, $componentSelector = null)
{
PHPUnit::assertContains($value, $this->vueAttribute($componentSelector, $key));
PHPUnit::assertTrue(
Str::contains($this->vueAttribute($componentSelector, $key), $value)
);

return $this;
}
Expand All @@ -753,7 +755,9 @@ public function assertVueContains($key, $value, $componentSelector = null)
*/
public function assertVueDoesNotContain($key, $value, $componentSelector = null)
{
PHPUnit::assertNotContains($value, $this->vueAttribute($componentSelector, $key));
PHPUnit::assertFalse(
Str::contains($this->vueAttribute($componentSelector, $key), $value)
);

return $this;
}
Expand Down

0 comments on commit 6d6ab62

Please sign in to comment.