Code Duplication    Length = 26-26 lines in 2 locations

projects/plugins/jetpack/tests/php/_inc/lib/test-class.jetpack-tweetstorm-helper.php 2 locations

@@ 1217-1242 (lines=26) @@
1214
	/**
1215
	 * Test that a long quote block splits.
1216
	 */
1217
	public function test_long_quote() {
1218
		$test_quote       = 'Here is a bunch of text for you. ';
1219
		$test_attribution = 'Gary Pendergast';
1220
1221
		$blocks = array(
1222
			$this->generateQuoteData( trim( str_repeat( $test_quote, 9 ) ), $test_attribution ),
1223
		);
1224
1225
		$expected_content = array(
1226
			array(
1227
				'text' => '“' . trim( str_repeat( $test_quote, 8 ) ),
1228
			),
1229
			array(
1230
				'text' => trim( $test_quote ) . "” – $test_attribution",
1231
			),
1232
		);
1233
1234
		$expected_boundaries = array(
1235
			$this->generateNormalBoundary( 263, 264, 'value' ),
1236
			false,
1237
		);
1238
1239
		$expected_blocks = array( $blocks, $blocks );
1240
1241
		$this->assertTweetGenerated( $blocks, $expected_content, $expected_boundaries, $expected_blocks );
1242
	}
1243
1244
	/**
1245
	 * Test that a quote block with multiple paragraphs splits correctly.
@@ 1277-1302 (lines=26) @@
1274
	/**
1275
	 * Test that a quote attribution with sentences in it splits.
1276
	 */
1277
	public function test_quote_attribution_sentence_splits() {
1278
		$test_quote       = 'Here is a bunch of text for you. ';
1279
		$test_attribution = 'Ugh. That guy. You know.';
1280
1281
		$blocks = array(
1282
			$this->generateQuoteData( trim( str_repeat( $test_quote, 8 ) ), $test_attribution ),
1283
		);
1284
1285
		$expected_content = array(
1286
			array(
1287
				'text' => '“' . trim( str_repeat( $test_quote, 8 ) ) . '” – Ugh.',
1288
			),
1289
			array(
1290
				'text' => 'That guy. You know.',
1291
			),
1292
		);
1293
1294
		$expected_boundaries = array(
1295
			$this->generateNormalBoundary( 4, 5, 'citation' ),
1296
			false,
1297
		);
1298
1299
		$expected_blocks = array( $blocks, $blocks );
1300
1301
		$this->assertTweetGenerated( $blocks, $expected_content, $expected_boundaries, $expected_blocks );
1302
	}
1303
1304
	/**
1305
	 * Test that a heading will start a new block.