diff options
Diffstat (limited to 'MLEB/Translate/tests/phpunit/FakeTTMServerTest.php')
-rw-r--r-- | MLEB/Translate/tests/phpunit/FakeTTMServerTest.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/MLEB/Translate/tests/phpunit/FakeTTMServerTest.php b/MLEB/Translate/tests/phpunit/FakeTTMServerTest.php new file mode 100644 index 00000000..811fb6ad --- /dev/null +++ b/MLEB/Translate/tests/phpunit/FakeTTMServerTest.php @@ -0,0 +1,26 @@ +<?php +declare( strict_types = 1 ); + +/** + * @author Niklas Laxström + * @license GPL-2.0-or-later + * @covers \FakeTTMServer + */ +class FakeTTMServerTest extends MediaWikiIntegrationTestCase { + public function testFakeTTMServer() { + $server = new FakeTTMServer(); + $this->assertEquals( + [], + $server->query( 'en', 'fi', 'daa' ), + 'FakeTTMServer returns no suggestions for all queries' + ); + + $title = $this->createMock( Title::class ); + $handle = new MessageHandle( $title ); + + $this->assertNull( + $server->update( $handle, 'text' ), + 'FakeTTMServer update is no-op and always succeeds' + ); + } +} |