summaryrefslogtreecommitdiff
blob: 811fb6adc08cef95dcbbdbd49c6eac190ebb4405 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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'
		);
	}
}