assertFalse( $checker->checkContent( 'spam content goes here' ) ); $this->assertFalse( $checker->checkSummary( 'spam summary goes here' ) ); } public function testMatchContent() { $checker = new SpamChecker( [ '/spam\s*content/' ], [] ); $this->assertSame( 'spam content', $checker->checkContent( 'spam content goes here' ) ); $this->assertFalse( $checker->checkSummary( 'spam summary goes here' ) ); } public function testMatchSummary() { $checker = new SpamChecker( [], [ '/spam\s*summary/' ] ); $this->assertFalse( $checker->checkContent( 'spam content goes here' ) ); $this->assertSame( 'spam summary', $checker->checkSummary( 'spam summary goes here' ) ); } }