Skip to content

Commit

Permalink
Add tests from #133 by @paulshryock
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzap committed Apr 19, 2023
1 parent 167be74 commit 96a8944
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/cases/unit/Api/FunctionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,22 @@ public function testStubsTranslationsReturn()
static::assertSame('Bar!', esc_html__('Bar!', 'my-txt-domain'));
static::assertSame('Baz!', esc_attr__('Baz!', 'my-txt-domain'));
static::assertSame('Foo bar', esc_attr_x('Foo bar', 'context', 'my-txt-domain'));
static::assertSame(
['singular' => 'Foo', 'plural' => 'Foos'],
_n_noop('Foo', 'Foos')
);
static::assertSame(
['singular' => 'Foo', 'plural' => 'Foos'],
_nx_noop('Foo', 'Foos')
);
static::assertSame(
'Foo',
translate_nooped_plural(['singular' => 'Foo', 'plural' => 'Foos'], 1)
);
static::assertSame(
'Foos',
translate_nooped_plural(['singular' => 'Foo', 'plural' => 'Foos'], 2)
);
}

public function testStubsTranslationsEcho()
Expand Down

0 comments on commit 96a8944

Please sign in to comment.