Completed
Push — update/package-logo-add-gray ( ed7018...20b963 )
by
unknown
37:49 queued 30:10
created

Test_Logo::mock_with_identity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 11
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 11
loc 11
rs 9.9
c 0
b 0
f 0
1
<?php
2
3
use Automattic\Jetpack\Assets\Logo;
4
5
use PHPUnit\Framework\TestCase;
6
7
class Test_Logo extends TestCase {
8
9
	/**
10
	 * Ensure the rendered logo has all the CSS classes needed for styling.
11
	 */
12
	function test_constructor_default_logo() {
13
		$logo = new Logo();
14
		$logo_render = $logo->render();
15
		$this->assertContains( '<svg xmlns="http://www.w3.org/2000/svg"', $logo_render );
16
		$this->assertContains( 'class="jetpack-logo"', $logo_render );
17
		$this->assertContains( 'class="jetpack-logo__icon-circle"', $logo_render );
18
		$this->assertEquals( 2, preg_match_all( '/class="jetpack-logo__icon-triangle"/', $logo_render ) );
19
		$this->assertContains( 'class="jetpack-logo__text"', $logo_render );
20
	}
21
22
}
23