yield ['bg.png', true
];
yield ['http://example.com/bg.png', false
];
yield ['http://example.com', false
];
yield ['', false
];
} /**
* @dataProvider provideIsLocalTests
*/
public function testIsLocal(string
$path, bool
$isLocal) { $this->
assertSame($isLocal, Path::
isLocal($path));
} public static function provideGetLongestCommonBasePathTests(): \Generator
{ // same paths
yield [['/base/path', '/base/path'
], '/base/path'
];
yield [['C:/base/path', 'C:/base/path'
], 'C:/base/path'
];
yield [['C:\\base\\path', 'C:\\base\\path'
], 'C:/base/path'
];
yield [['C:/base/path', 'C:\\base\\path'
], 'C:/base/path'
];
yield [['phar:///base/path', 'phar:///base/path'
], 'phar:///base/path'
];
yield [['phar://C:/base/path', 'phar://C:/base/path'
], 'phar://C:/base/path'
];