mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
Move PHPUnit tests into a tests/phpunit directory.
wp-tests-config.php can/should reside in the root of a develop checkout. `phpunit` should be run from the root. see #25088. git-svn-id: https://develop.svn.wordpress.org/trunk@25165 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @group formatting
|
||||
*/
|
||||
class Tests_Formatting_HtmlExcerpt extends WP_UnitTestCase {
|
||||
function test_simple() {
|
||||
$this->assertEquals("Baba", wp_html_excerpt("Baba told me not to come", 4));
|
||||
}
|
||||
function test_html() {
|
||||
$this->assertEquals("Baba", wp_html_excerpt("<a href='http://baba.net/'>Baba</a> told me not to come", 4));
|
||||
}
|
||||
function test_entities() {
|
||||
$this->assertEquals("Baba", wp_html_excerpt("Baba & Dyado", 8));
|
||||
$this->assertEquals("Baba", wp_html_excerpt("Baba & Dyado", 8));
|
||||
$this->assertEquals("Baba & D", wp_html_excerpt("Baba & Dyado", 12));
|
||||
$this->assertEquals("Baba & Dyado", wp_html_excerpt("Baba & Dyado", 100));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user