tests/Assertions/AssertContainsTest.php
/**
     * Test assertion.
     *
     * @dataProvider assertionDataProvider
     *
     * @param string $assertContent   The assert content.
     * @param int    $modifiers       The modifiers.
     * @param string $content         The content.
     * @param bool   $expectedSuccess True the expected result is success, false otherwise.
     * @param string $expectedError   The expected error.
     */
Test assertion.

@param string $assertContent   The assert content.
@param int    $modifiers       The modifiers.
@param string $content         The content.
@param bool   $expectedSuccess True the expected result is success, false otherwise.
@param string $expectedError   The expected error.
Test assertion . @param string $assertContent The assert content . @param int $modifiers The modifiers . @param string $content The content . @param bool $expectedSuccess True the expected result is success false otherwise . @param string $expectedError The expected error .
public function testAssertion(string $assertContent, int $modifiers, string $content, bool $expectedSuccess, string $expectedError)
    {
        $location = new FileLocation(FilePath::parse('/tmp/tests'), 10);
        $assert = new AssertContains($location, $assertContent, new Modifiers($modifiers));
        $pageResult = new PageResult(200, [], $content);
        $result = $assert->test($pageResult);
        self::assertSame($location, $assert->getLocation());
        self::assertSame($assertContent, $assert->getContent());
        self::assertSame($expectedSuccess, $result->isSuccess());
        self::assertSame($expectedError, $result->getError());
    }
public function testAssertion ( string $ assertContent , int $ modifiers , string $ content , bool $ expectedSuccess , string $ expectedError ) { $ location = new FileLocation ( FilePath :: parse ( '/tmp/tests' ) , 10 ) ; $ assert = new AssertContains ( $ location , $ assertContent , new Modifiers ( $ modifiers ) ) ; $ pageResult = new PageResult ( 200 , [ ] , $ content ) ; $ result = $ assert -> test ( $ pageResult ) ; self :: assertSame ( $ location , $ assert -> getLocation ( ) ) ; self :: assertSame ( $ assertContent , $ assert -> getContent ( ) ) ; self :: assertSame ( $ expectedSuccess , $ result -> isSuccess ( ) ) ; self :: assertSame ( $ expectedError , $ result -> getError ( ) ) ; }
Test assertion.
Test assertion .