@@ 1234-1259 (lines=26) @@ | ||
1231 | /** |
|
1232 | * Test that a long quote block splits. |
|
1233 | */ |
|
1234 | public function test_long_quote() { |
|
1235 | $test_quote = 'Here is a bunch of text for you. '; |
|
1236 | $test_attribution = 'Gary Pendergast'; |
|
1237 | ||
1238 | $blocks = array( |
|
1239 | $this->generateQuoteData( trim( str_repeat( $test_quote, 9 ) ), $test_attribution ), |
|
1240 | ); |
|
1241 | ||
1242 | $expected_content = array( |
|
1243 | array( |
|
1244 | 'text' => '“' . trim( str_repeat( $test_quote, 8 ) ), |
|
1245 | ), |
|
1246 | array( |
|
1247 | 'text' => trim( $test_quote ) . "” – $test_attribution", |
|
1248 | ), |
|
1249 | ); |
|
1250 | ||
1251 | $expected_boundaries = array( |
|
1252 | $this->generateNormalBoundary( 263, 264, 'value' ), |
|
1253 | false, |
|
1254 | ); |
|
1255 | ||
1256 | $expected_blocks = array( $blocks, $blocks ); |
|
1257 | ||
1258 | $this->assertTweetGenerated( $blocks, $expected_content, $expected_boundaries, $expected_blocks ); |
|
1259 | } |
|
1260 | ||
1261 | /** |
|
1262 | * Test that a quote block with multiple paragraphs splits correctly. |
|
@@ 1294-1319 (lines=26) @@ | ||
1291 | /** |
|
1292 | * Test that a quote attribution with sentences in it splits. |
|
1293 | */ |
|
1294 | public function test_quote_attribution_sentence_splits() { |
|
1295 | $test_quote = 'Here is a bunch of text for you. '; |
|
1296 | $test_attribution = 'Ugh. That guy. You know.'; |
|
1297 | ||
1298 | $blocks = array( |
|
1299 | $this->generateQuoteData( trim( str_repeat( $test_quote, 8 ) ), $test_attribution ), |
|
1300 | ); |
|
1301 | ||
1302 | $expected_content = array( |
|
1303 | array( |
|
1304 | 'text' => '“' . trim( str_repeat( $test_quote, 8 ) ) . '” – Ugh.', |
|
1305 | ), |
|
1306 | array( |
|
1307 | 'text' => 'That guy. You know.', |
|
1308 | ), |
|
1309 | ); |
|
1310 | ||
1311 | $expected_boundaries = array( |
|
1312 | $this->generateNormalBoundary( 4, 5, 'citation' ), |
|
1313 | false, |
|
1314 | ); |
|
1315 | ||
1316 | $expected_blocks = array( $blocks, $blocks ); |
|
1317 | ||
1318 | $this->assertTweetGenerated( $blocks, $expected_content, $expected_boundaries, $expected_blocks ); |
|
1319 | } |
|
1320 | ||
1321 | /** |
|
1322 | * Test that a heading will start a new block. |