@@ -376,6 +376,28 @@ public function testAssertSeeEscapedCanFail()
376376 $ response ->assertSee (['bar & baz ' , 'baz & qux ' ]);
377377 }
378378
379+ public function testAssertSeeHtml ()
380+ {
381+ $ response = $ this ->makeMockResponse ([
382+ 'render ' => '<ul><li>foo</li><li>bar</li><li>baz</li><li>foo</li></ul> ' ,
383+ ]);
384+
385+ $ response ->assertSeeHtml ('<li>foo</li> ' );
386+ $ response ->assertSeeHtml (['<li>baz</li> ' , '<li>bar</li> ' ]);
387+ }
388+
389+ public function testAssertSeeHtmlCanFail ()
390+ {
391+ $ this ->expectException (AssertionFailedError::class);
392+
393+ $ response = $ this ->makeMockResponse ([
394+ 'render ' => '<ul><li>foo</li><li>bar</li><li>baz</li><li>foo</li></ul> ' ,
395+ ]);
396+
397+ $ response ->assertSeeHtml ('<li>item</li> ' );
398+ $ response ->assertSeeHtml (['<li>not</li> ' , '<li>found</li> ' ]);
399+ }
400+
379401 public function testAssertSeeInOrder ()
380402 {
381403 $ response = $ this ->makeMockResponse ([
@@ -409,6 +431,39 @@ public function testAssertSeeInOrderCanFail2()
409431 $ response ->assertSeeInOrder (['foo ' , 'qux ' , 'bar ' , 'baz ' ]);
410432 }
411433
434+ public function testAssertSeeHtmlInOrder ()
435+ {
436+ $ response = $ this ->makeMockResponse ([
437+ 'render ' => '<ul><li>foo</li><li>bar</li><li>baz</li><li>foo</li></ul> ' ,
438+ ]);
439+
440+ $ response ->assertSeeHtmlInOrder (['<li>foo</li> ' , '<li>bar</li> ' , '<li>baz</li> ' ]);
441+
442+ $ response ->assertSeeHtmlInOrder (['<li>foo</li> ' , '<li>bar</li> ' , '<li>baz</li> ' , '<li>foo</li> ' ]);
443+ }
444+
445+ public function testAssertSeeHtmlInOrderCanFail ()
446+ {
447+ $ this ->expectException (AssertionFailedError::class);
448+
449+ $ response = $ this ->makeMockResponse ([
450+ 'render ' => '<ul><li>foo</li><li>bar</li><li>baz</li><li>foo</li></ul> ' ,
451+ ]);
452+
453+ $ response ->assertSeeHtmlInOrder (['<li>baz</li> ' , '<li>bar</li> ' , '<li>foo</li> ' ]);
454+ }
455+
456+ public function testAssertSeeHtmlInOrderCanFail2 ()
457+ {
458+ $ this ->expectException (AssertionFailedError::class);
459+
460+ $ response = $ this ->makeMockResponse ([
461+ 'render ' => '<ul><li>foo</li><li>bar</li><li>baz</li><li>foo</li></ul> ' ,
462+ ]);
463+
464+ $ response ->assertSeeHtmlInOrder (['<li>foo</li> ' , '<li>qux</li> ' , '<li>bar</li> ' , '<li>baz</li> ' ]);
465+ }
466+
412467 public function testAssertSeeText ()
413468 {
414469 $ response = $ this ->makeMockResponse ([
@@ -539,6 +594,28 @@ public function testAssertDontSeeEscapedCanFail()
539594 $ response ->assertDontSee (['php & friends ' , 'laravel & php ' ]);
540595 }
541596
597+ public function testAssertDontSeeHtml ()
598+ {
599+ $ response = $ this ->makeMockResponse ([
600+ 'render ' => '<ul><li>foo</li><li>bar</li><li>baz</li><li>foo</li></ul> ' ,
601+ ]);
602+
603+ $ response ->assertDontSeeHtml ('<li>laravel</li> ' );
604+ $ response ->assertDontSeeHtml (['<li>php</li> ' , '<li>friends</li> ' ]);
605+ }
606+
607+ public function testAssertDontSeeHtmlCanFail ()
608+ {
609+ $ this ->expectException (AssertionFailedError::class);
610+
611+ $ response = $ this ->makeMockResponse ([
612+ 'render ' => '<ul><li>foo</li><li>bar</li><li>baz</li><li>foo</li></ul> ' ,
613+ ]);
614+
615+ $ response ->assertDontSeeHtml ('<li>foo</li> ' );
616+ $ response ->assertDontSeeHtml (['<li>baz</li> ' , '<li>bar</li> ' ]);
617+ }
618+
542619 public function testAssertDontSeeText ()
543620 {
544621 $ response = $ this ->makeMockResponse ([
0 commit comments