Move testcase file to right place

Test Plan: `arc unit`, see test name in list.

Reviewers: chad, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D16915
This commit is contained in:
Aviv Eyal
2016-11-22 18:54:15 +00:00
committed by avivey
parent f89f708692
commit 256d14c7ea
2 changed files with 2 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php
final class PhabricatorTypeaheadDatasourceTestCase
extends PhabricatorTestCase {
public function testTypeaheadTokenization() {
$this->assertTokenization(
'The quick brown fox',
array('the', 'quick', 'brown', 'fox'));
$this->assertTokenization(
'Quack quack QUACK',
array('quack'));
$this->assertTokenization(
'',
array());
$this->assertTokenization(
' [ - ] ',
array());
$this->assertTokenization(
'jury-rigged',
array('jury', 'rigged'));
$this->assertTokenization(
'[[ brackets ]] [-] ]-[ tie-fighters',
array('brackets', 'tie', 'fighters'));
}
private function assertTokenization($input, $expect) {
$this->assertEqual(
$expect,
PhabricatorTypeaheadDatasource::tokenizeString($input),
pht('Tokenization of "%s"', $input));
}
}