Skip to content

Commit 0ec6e5d

Browse files
authored
Merge pull request #224 from projectedanx/jules-141920729589512018-ee1db5a2
🧪 Add test for hyphens in urls plugin
2 parents 1238a01 + 384a25d commit 0ec6e5d

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
#[\PHPUnit\Framework\Attributes\Group('plugins')]
4+
class HyphensInUrlsPluginTest extends PHPUnit\Framework\TestCase {
5+
6+
protected function setUp(): void {
7+
parent::setUp();
8+
require_once dirname( dirname( dirname( __DIR__ ) ) ) . '/user/plugins/hyphens-in-urls/plugin.php';
9+
}
10+
11+
public function test_ozh_hyphen_in_charset() {
12+
$this->assertTrue( function_exists( 'ozh_hyphen_in_charset' ) );
13+
14+
$this->assertSame( '-', ozh_hyphen_in_charset( '' ) );
15+
$this->assertSame( 'abc-', ozh_hyphen_in_charset( 'abc' ) );
16+
$this->assertSame( '0123456789-', ozh_hyphen_in_charset( '0123456789' ) );
17+
}
18+
}

0 commit comments

Comments
 (0)