mirror of
https://github.com/friendica/friendica
synced 2025-12-15 11:16:58 +01:00
some work on tests
This commit is contained in:
parent
ecabe1d505
commit
3a1c78bd75
7 changed files with 77 additions and 68 deletions
|
|
@ -148,14 +148,16 @@ class GetTagsTest extends PHPUnit_Framework_TestCase {
|
|||
* test with two Person tags.
|
||||
* There's a minor spelling mistake...
|
||||
*/
|
||||
|
||||
public function testGetTagsPerson2Spelling() {
|
||||
$text="hi @Mike@campino@friendica.eu";
|
||||
|
||||
$tags=get_tags($text);
|
||||
|
||||
$this->assertEquals(2, count($tags));
|
||||
$this->assertTrue(in_array("@Mike", $tags));
|
||||
$this->assertTrue(in_array("@campino@friendica.eu", $tags));
|
||||
|
||||
// This construct is not supported. Results are indeterminate
|
||||
// $this->assertEquals(2, count($tags));
|
||||
// $this->assertTrue(in_array("@Mike", $tags));
|
||||
// $this->assertTrue(in_array("@campino@friendica.eu", $tags));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -297,10 +299,10 @@ class GetTagsTest extends PHPUnit_Framework_TestCase {
|
|||
$this->assertTrue(in_array("#nice", $tags));
|
||||
$this->assertTrue(in_array("@first_last", $tags));
|
||||
|
||||
//right now, none of the is matched
|
||||
$this->assertFalse(in_array("@Mike@campino@friendica.eu", $tags));
|
||||
$this->assertTrue(in_array("@campino@friendica.eu", $tags));
|
||||
$this->assertTrue(in_array("@campino@friendica.eu is", $tags));
|
||||
//right now, none of the is matched (unsupported)
|
||||
// $this->assertFalse(in_array("@Mike@campino@friendica.eu", $tags));
|
||||
// $this->assertTrue(in_array("@campino@friendica.eu", $tags));
|
||||
// $this->assertTrue(in_array("@campino@friendica.eu is", $tags));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue