init(); } /** * Test get and set items. */ public function test_style_inline() { $email = new WC_Email(); // Test HTML email with inline styles. $email->email_type = 'html'; // Set some content to get converted. $result = $email->style_inline( '
Hello World!
' ); ob_start(); include WC_Unit_Tests_Bootstrap::instance()->tests_dir . '/data/sample-email.html'; $expected = ob_get_clean(); $this->assertEquals( $expected, $result ); // Test plain text email. $email->email_type = 'plain'; // Set some content to get converted. $result = $email->style_inline( 'Hello World!
' ); $expected = 'Hello World!
'; $this->assertEquals( $expected, $result ); } }