tests/RequestFilterTest.php
/**
     * @dataProvider sampleResponses
     *
     * @param HTTPResponse $response
     * @param bool $match
     */
@dataProvider sampleResponses
@param HTTPResponse $response
@param bool $match
@dataProvider sampleResponses @param HTTPResponse $response @param bool $match
public function testScriptInsertion($response, $match)
    {
        $tag = DBField::create_field(
            "HTMLText",
            "<script>'use strict'</script>"
        );
        if ($match) {
            $this->assertRegExp(
                "#<script>'use strict'</script></head>#is",
                $this->checkFilterForResponse($response, $tag)->getBody()
            );
        } else {
            $this->assertNotRegExp(
                "#<script>'use strict'</script></head>#is",
                $this->checkFilterForResponse($response, $tag)->getBody()
            );
        }
    }
public function testScriptInsertion ( $ response , $ match ) { $ tag = DBField :: create_field ( " HTMLText " , " <script>'use strict'</script> " ) ; if ( $ match ) { $ this -> assertRegExp ( " #<script>'use strict'</script></head>#is " , $ this -> checkFilterForResponse ( $ response , $ tag ) -> getBody ( ) ) ; } else { $ this -> assertNotRegExp ( " #<script>'use strict'</script></head>#is " , $ this -> checkFilterForResponse ( $ response , $ tag ) -> getBody ( ) ) ; } }
@dataProvider sampleResponses
 @param HTTPResponse $response
 @param bool $match
@dataProvider sampleResponses @param HTTPResponse $response @param bool $match