Code Duplication    Length = 8-8 lines in 2 locations

tests/CommentNotifiableTest.php 1 location

@@ 13-20 (lines=8) @@
10
		'CommentNotifiableTest_DataObject'
11
	);
12
	
13
	public function setUp() {
14
		parent::setUp();
15
		Config::nest();
16
		
17
		Config::inst()->update('Email', 'admin_email', '[email protected]');
18
		$this->oldhost = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : null;
19
		$_SERVER['HTTP_HOST'] = 'www.mysite.com';
20
	}
21
22
	public function tearDown() {
23
		$_SERVER['HTTP_HOST'] = $this->oldhost;

tests/CommentNotifierTest.php 1 location

@@ 13-20 (lines=8) @@
10
		'CommentNotifiableTest_DataObject'
11
	);
12
	
13
	public function setUp() {
14
		parent::setUp();
15
		Email::set_mailer(new EmailTest_Mailer());
16
		Config::nest();
17
		Config::inst()->update('Email', 'admin_email', '[email protected]');
18
		$this->oldhost = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : null;
19
		$_SERVER['HTTP_HOST'] = 'www.mysite.com';
20
	}
21
22
	public function tearDown() {
23
		$_SERVER['HTTP_HOST'] = $this->oldhost;