phpstreams\tests\unit\StreamTest::testIsValidSource PHP Method

testIsValidSource() public method

Test whether the source checker actually works.
public testIsValidSource ( )
    public function testIsValidSource()
    {
        $this->assertTrue(Stream::isValidSource([]), 'Arrays should be valid sources.');
        $this->assertTrue(Stream::isValidSource(new DirectoryIterator(__DIR__)), 'Iterators should be valid sources.');
        $this->assertFalse(Stream::isValidSource("Not a stream"), "Strings should be invalid sources.");
    }