Code Duplication    Length = 10-10 lines in 2 locations

packages/terms-of-service/tests/php/test_TermsOfService.php 2 locations

@@ 68-77 (lines=10) @@
65
	/**
66
	 * @covers Automattic\Jetpack\Terms_Of_Service->has_agreed
67
	 */
68
	public function test_has_agreed_is_active_mode() {
69
		$this->terms_of_service->expects( $this->once() )->method( 'get_raw_has_agreed' )->willReturn( true );
70
		// Not in dev mode...
71
		$this->terms_of_service->expects( $this->once() )->method( 'is_development_mode' )->willReturn( false );
72
73
		// Jetpack is active
74
		$this->terms_of_service->expects( $this->once() )->method( 'is_active' )->willReturn( true );
75
76
		$this->assertTrue( $this->terms_of_service->has_agreed() );
77
	}
78
79
	/**
80
	 * @covers Automattic\Jetpack\Terms_Of_Service->has_agreed
@@ 82-91 (lines=10) @@
79
	/**
80
	 * @covers Automattic\Jetpack\Terms_Of_Service->has_agreed
81
	 */
82
	public function test_has_agreed_is_not_active_mode() {
83
		$this->terms_of_service->expects( $this->once() )->method( 'get_raw_has_agreed' )->willReturn( true );
84
		// not in dev mode...
85
		$this->terms_of_service->expects( $this->once() )->method( 'is_development_mode' )->willReturn( false );
86
87
		// Jetpack is not active
88
		$this->terms_of_service->expects( $this->once() )->method( 'is_active' )->willReturn( false );
89
90
		$this->assertFalse( $this->terms_of_service->has_agreed() );
91
	}
92
93
	/**
94
	 * Mock a global function and make it return a certain value.