Code Duplication    Length = 11-15 lines in 2 locations

packages/logo/tests/php/test_Logo.php 2 locations

@@ 54-68 (lines=15) @@
51
		$this->assertRegExp( '/.+alt="[^"]+".+/', $output );
52
	}
53
54
	protected function mock_plugins_url() {
55
		$builder = new MockBuilder();
56
		$builder->setNamespace( __NAMESPACE__ )
57
			->setName( 'plugins_url' )
58
			->setFunction(
59
				function () {
60
					return $this->logo_url;
61
				}
62
			);
63
64
		$mock = $builder->build();
65
		$mock->enable();
66
67
		return $mock;
68
	}
69
70
	protected function mock_with_identity( $function_name ) {
71
		$builder = new MockBuilder();
@@ 70-80 (lines=11) @@
67
		return $mock;
68
	}
69
70
	protected function mock_with_identity( $function_name ) {
71
		$builder = new MockBuilder();
72
		$builder->setNamespace( __NAMESPACE__ )
73
			->setName( $function_name )
74
			->setFunction( array( $this, 'identity' ) );
75
76
		$mock = $builder->build();
77
		$mock->enable();
78
79
		return $mock;
80
	}
81
82
	public function identity( $value ) {
83
		return $value;