Skip to content

Commit

Permalink
Fix ajax/oembed test for wp 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsternberg committed Nov 14, 2017
1 parent 0ba9073 commit 15a5ff3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/test-cmb-ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,17 @@ public function test_get_oembed_delete_with_expired_ttl() {
$this->cmb->save_fields();
$options = $this->get_option();

$this->assertEquals( $new, $options );
if ( $this->is_3_8() ) {
foreach ( array(
'<iframe',
'src="https://www.youtube.com/embed/NCXyEKqmWdA?feature=oembed"',
'</iframe>',
) as $part ) {
$this->assertTrue( false !== strpos( $options['_oembed_887df34cb3e109936f1e848042f873a3'], $part ), $part );
}
} else {
$this->assertEquals( $new, $options );
}
}

protected function get_option() {
Expand Down

0 comments on commit 15a5ff3

Please sign in to comment.