UnCurlyQuoteTest

The WordPress Core UnCurlyQuoteTest class.

Defined (1)

The class is defined in the following location(s).

/phpunit/UnCurlyQuoteTest.php  
  1. class UnCurlyQuoteTest extends PHPUnit_Framework_TestCase { 
  2.  
  3. public function testStripCurlyQuote() { 
  4. $sl = new UnCurlyQuoteTestShortCodeLoader; 
  5. $stripped = $sl->stripCurlyQuotes('*hello*'); 
  6. $this->assertEquals('hello', $stripped); 
  7.  
  8. public function testStripCurlyQuote2() { 
  9. $sl = new UnCurlyQuoteTestShortCodeLoader; 
  10. $stripped = $sl->stripCurlyQuotes('*3*'); 
  11. $this->assertEquals('3', $stripped); 
  12.  
  13. public function testStripCurlyQuote3() { 
  14. $sl = new UnCurlyQuoteTestShortCodeLoader; 
  15. $stripped = $sl->decodeString('*submit_time>-6 0=days*'); 
  16. $this->assertEquals('submit_time>-6 0=days', $stripped); 
  17.  
  18. public function testNotStripCurlyQuoteStart() { 
  19. $sl = new UnCurlyQuoteTestShortCodeLoader; 
  20. $stripped = $sl->stripCurlyQuotes('*hello'); 
  21. $this->assertEquals('*hello', $stripped); 
  22.  
  23. public function testNotStripCurlyQuoteEnd() { 
  24. $sl = new UnCurlyQuoteTestShortCodeLoader; 
  25. $stripped = $sl->stripCurlyQuotes('hello*'); 
  26. $this->assertEquals('hello*', $stripped); 
  27.  
  28. // https://core.trac.wordpress.org/ticket/29658#comment:4 
  29. public function testWorkAroundForSpaceParseBug() { 
  30. $sl = new UnCurlyQuoteTestShortCodeLoader; 
  31. $atts['filter'] = '*submit_time>-6'; 
  32. $atts[0] = 'days*'; 
  33. $atts = $sl->decodeAttributes($atts); 
  34. $this->assertEquals('submit_time>-6 days', $atts['filter']); 
  35. $this->assertFalse(isset($atts[0])); 
  36.