Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Jun 24, 2021
1 parent 07d172b commit 9d338a1
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/Feature/SchemalessUrlTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace NovaKit\Tests\Unit;

use function NovaKit\schemaless_url;
use Orchestra\Testbench\TestCase;

class SchemalessUrlTest extends TestCase
{
/**
* @test
* @dataProvider castSchemalessUrlDataProvider
*/
public function it_can_cast_schemaless_url($given, $expected)
{
$this->assertSame($expected, schemaless_url($given));
}

public function castSchemalessUrlDataProvider()
{
yield ['https://nova.laravel.com/', 'nova.laravel.com/'];
yield ['http://nova.laravel.com/', 'nova.laravel.com/'];
yield ['https://nova.laravel.com', 'nova.laravel.com'];
yield ['http://nova.laravel.com', 'nova.laravel.com'];
}
}

0 comments on commit 9d338a1

Please sign in to comment.