-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mior Muhammad Zaki <[email protected]>
- Loading branch information
Showing
2 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Orchestra\DuskUpdater\Tests; | ||
|
||
use function Orchestra\DuskUpdater\chromedriver_binary_filename; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class HelpersTest extends TestCase | ||
{ | ||
/** | ||
* @dataProvider binaryFileDataProvider | ||
*/ | ||
public function test_it_can_resolve_correct_filename($os, $given, $expected) | ||
{ | ||
$this->assertSame(chromedriver_binary_filename($given, $os), $expected); | ||
} | ||
|
||
public static function binaryFileDataProvider() | ||
{ | ||
yield ['linux', 'chromedriver', 'chromedriver-linux']; | ||
yield ['mac-intel', 'chromedriver', 'chromedriver-mac-intel']; | ||
yield ['mac-arm', 'chromedriver', 'chromedriver-mac-arm']; | ||
yield ['win32', 'chromedriver.exe', 'chromedriver-win32.exe']; | ||
|
||
yield ['linux', 'chromedriver-115'.DIRECTORY_SEPARATOR.'chromedriver', 'chromedriver-linux']; | ||
yield ['mac-intel', 'chromedriver-115'.DIRECTORY_SEPARATOR.'chromedriver', 'chromedriver-mac-intel']; | ||
yield ['mac-arm', 'chromedriver-115'.DIRECTORY_SEPARATOR.'chromedriver', 'chromedriver-mac-arm']; | ||
yield ['win32', 'chromedriver-115'.DIRECTORY_SEPARATOR.'chromedriver.exe', 'chromedriver-win32.exe']; | ||
} | ||
} |