Skip to content

Commit dc683ee

Browse files
committed
renaming methods
1 parent 0ed6359 commit dc683ee

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/Concerns/MakesAssertions.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,40 +206,40 @@ public function assertDontSeeIn($selector, $text)
206206
}
207207

208208
/**
209-
* Assert that the given selector has no text.
209+
* Assert that the given selector has some text.
210210
*
211211
* @param string $selector
212212
* @return $this
213213
*/
214-
public function assertSeeEmptyTextIn($selector)
214+
public function assertSeeAnythingIn($selector)
215215
{
216216
$fullSelector = $this->resolver->format($selector);
217217

218218
$element = $this->resolver->findOrFail($selector);
219219

220220
PHPUnit::assertTrue(
221-
$element->getText() === '',
222-
"Did not see expected text [''] within element [{$fullSelector}]."
221+
$element->getText() !== '',
222+
"Saw unexpected text [''] within element [{$fullSelector}]."
223223
);
224224

225225
return $this;
226226
}
227227

228228
/**
229-
* Assert that the given selector has some text.
229+
* Assert that the given selector has no text.
230230
*
231231
* @param string $selector
232232
* @return $this
233233
*/
234-
public function assertDontSeeEmptyTextIn($selector)
234+
public function assertSeeNothingIn($selector)
235235
{
236236
$fullSelector = $this->resolver->format($selector);
237237

238238
$element = $this->resolver->findOrFail($selector);
239239

240240
PHPUnit::assertTrue(
241-
$element->getText() !== '',
242-
"Saw unexpected text [''] within element [{$fullSelector}]."
241+
$element->getText() === '',
242+
"Did not see expected text [''] within element [{$fullSelector}]."
243243
);
244244

245245
return $this;

tests/MakesAssertionsTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ public function test_assert_see_empty_text_in_element_with_empty_text()
11311131

11321132
$browser = new Browser($driver, $resolver);
11331133

1134-
$browser->assertSeeEmptyTextIn('foo');
1134+
$browser->assertSeeNothingIn('foo');
11351135
}
11361136

11371137
public function test_assert_see_empty_text_in_element_without_empty_text()
@@ -1148,7 +1148,7 @@ public function test_assert_see_empty_text_in_element_without_empty_text()
11481148
$browser = new Browser($driver, $resolver);
11491149

11501150
try {
1151-
$browser->assertSeeEmptyTextIn('foo');
1151+
$browser->assertSeeNothingIn('foo');
11521152
} catch (ExpectationFailedException $e) {
11531153
$this->assertStringContainsString(
11541154
'Did not see expected text [\'\'] within element [body foo].',
@@ -1171,7 +1171,7 @@ public function test_assert_dont_see_empty_text_in_element_with_empty_text()
11711171
$browser = new Browser($driver, $resolver);
11721172

11731173
try {
1174-
$browser->assertDontSeeEmptyTextIn('foo');
1174+
$browser->assertSeeAnythingIn('foo');
11751175
} catch (ExpectationFailedException $e) {
11761176
$this->assertStringContainsString(
11771177
'Saw unexpected text [\'\'] within element [body foo].',
@@ -1193,7 +1193,7 @@ public function test_assert_dont_see_empty_text_in_element_without_empty_text()
11931193

11941194
$browser = new Browser($driver, $resolver);
11951195

1196-
$browser->assertDontSeeEmptyTextIn('foo');
1196+
$browser->assertSeeAnythingIn('foo');
11971197
}
11981198

11991199
public function test_assert_source_has()

0 commit comments

Comments
 (0)