|
@@ 1807-1822 (lines=16) @@
|
| 1804 |
|
/** |
| 1805 |
|
* Test that a spacer block starts a new tweet. |
| 1806 |
|
*/ |
| 1807 |
|
public function test_spacer_starts_new_tweet() { |
| 1808 |
|
$test_content = 'This is some content.'; |
| 1809 |
|
$blocks = array( |
| 1810 |
|
$this->generateParagraphData( $test_content ), |
| 1811 |
|
$this->generateSpacerData(), |
| 1812 |
|
$this->generateParagraphData( $test_content ), |
| 1813 |
|
$this->generateParagraphData( $test_content ), |
| 1814 |
|
); |
| 1815 |
|
|
| 1816 |
|
$this->assertTweetGenerated( |
| 1817 |
|
$blocks, |
| 1818 |
|
array( "$test_content", "$test_content\n\n$test_content" ), |
| 1819 |
|
array( false, false ), |
| 1820 |
|
array( array_slice( $blocks, 0, 2 ), array_slice( $blocks, 2, 2 ) ) |
| 1821 |
|
); |
| 1822 |
|
} |
| 1823 |
|
|
| 1824 |
|
/** |
| 1825 |
|
* Test that a separator block starts a new tweet. |
|
@@ 1827-1842 (lines=16) @@
|
| 1824 |
|
/** |
| 1825 |
|
* Test that a separator block starts a new tweet. |
| 1826 |
|
*/ |
| 1827 |
|
public function test_separator_starts_new_tweet() { |
| 1828 |
|
$test_content = 'This is some content.'; |
| 1829 |
|
$blocks = array( |
| 1830 |
|
$this->generateParagraphData( $test_content ), |
| 1831 |
|
$this->generateParagraphData( $test_content ), |
| 1832 |
|
$this->generateSeparatorData(), |
| 1833 |
|
$this->generateParagraphData( $test_content ), |
| 1834 |
|
); |
| 1835 |
|
|
| 1836 |
|
$this->assertTweetGenerated( |
| 1837 |
|
$blocks, |
| 1838 |
|
array( "$test_content\n\n$test_content", "$test_content" ), |
| 1839 |
|
array( false, false ), |
| 1840 |
|
array( array_slice( $blocks, 0, 3 ), array_slice( $blocks, 3, 1 ) ) |
| 1841 |
|
); |
| 1842 |
|
} |
| 1843 |
|
|
| 1844 |
|
/** |
| 1845 |
|
* Test that an embedded tweet block will be appended to the previous tweet. |