Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 4e96f54

Browse files
author
Jamie Snape
committed
Fix style errors in download controller
1 parent b9532d6 commit 4e96f54

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

modules/demo/constant/module.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
define('MIDAS_DEMO_USER_PASSWORD', 'user');
2828

2929
define('MIDAS_DEMO_DYNAMIC_HELP', '
30-
<b>To authenticate:</b><br /><br />
31-
Demo Administrator<br />
32-
- Login: '.MIDAS_DEMO_ADMIN_EMAIL.'<br />
33-
- Password: '.MIDAS_DEMO_ADMIN_PASSWORD.'<br /><br />
34-
Demo User<br />
35-
- Login: '.MIDAS_DEMO_USER_EMAIL.'<br />
36-
- Password: '.MIDAS_DEMO_USER_PASSWORD);
30+
<b>To authenticate:</b><br /><br />
31+
Demo Administrator<br />
32+
- Login: '.MIDAS_DEMO_ADMIN_EMAIL.'<br />
33+
- Password: '.MIDAS_DEMO_ADMIN_PASSWORD.'<br /><br />
34+
Demo User<br />
35+
- Login: '.MIDAS_DEMO_USER_EMAIL.'<br />
36+
- Password: '.MIDAS_DEMO_USER_PASSWORD);

modules/keyfiles/tests/controllers/DownloadControllerTest.php

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,45 +21,45 @@
2121
/** Test keyfiles download controller. */
2222
class Keyfiles_DownloadControllerTest extends ControllerTestCase
2323
{
24-
/** Set up tests. */
25-
public function setUp()
26-
{
27-
$this->setupDatabase(array('default')); //core dataset
28-
$this->enabledModules = array('keyfiles');
29-
$this->_models = array('Bitstream', 'Item', 'User');
24+
/** Set up tests. */
25+
public function setUp()
26+
{
27+
$this->setupDatabase(array('default')); //core dataset
28+
$this->enabledModules = array('keyfiles');
29+
$this->_models = array('Bitstream', 'Item', 'User');
3030

31-
parent::setUp();
32-
}
31+
parent::setUp();
32+
}
3333

34-
/** Test downloading of a single bitstream key file. */
35-
public function testDownloadBitstreamKeyfile()
36-
{
37-
$usersFile = $this->loadData('User', 'default');
38-
$bitstreamsFile = $this->loadData('Bitstream', 'default');
39-
$userDao = $this->User->load($usersFile[2]->getKey());
40-
$bitstreamDao = $this->Bitstream->load($bitstreamsFile[0]->getKey());
34+
/** Test downloading of a single bitstream key file. */
35+
public function testDownloadBitstreamKeyfile()
36+
{
37+
$usersFile = $this->loadData('User', 'default');
38+
$bitstreamsFile = $this->loadData('Bitstream', 'default');
39+
$userDao = $this->User->load($usersFile[2]->getKey());
40+
$bitstreamDao = $this->Bitstream->load($bitstreamsFile[0]->getKey());
4141

42-
$url = '/keyfiles/download/bitstream?bitstreamId='.$bitstreamDao->getKey();
42+
$url = '/keyfiles/download/bitstream?bitstreamId='.$bitstreamDao->getKey();
4343

44-
// Should throw an exception for no bitstream parameter
45-
$this->dispatchUrl('/keyfiles/download/bitstream', null, true);
44+
// Should throw an exception for no bitstream parameter
45+
$this->dispatchUrl('/keyfiles/download/bitstream', null, true);
4646

47-
// Make sure we get the checksum as the response
48-
$this->resetAll();
49-
$this->dispatchUrl($url, $userDao);
50-
$this->assertEquals($bitstreamDao->getChecksum(), $this->getBody());
51-
}
47+
// Make sure we get the checksum as the response
48+
$this->resetAll();
49+
$this->dispatchUrl($url, $userDao);
50+
$this->assertEquals($bitstreamDao->getChecksum(), $this->getBody());
51+
}
5252

53-
/** Test downloading of a recursive zip of keyfiles. */
54-
public function testDownloadZip()
55-
{
56-
// Should throw an exception for no bitstream parameter
57-
$this->dispatchUrl('/keyfiles/download/batch', null, true);
53+
/** Test downloading of a recursive zip of keyfiles. */
54+
public function testDownloadZip()
55+
{
56+
// Should throw an exception for no bitstream parameter
57+
$this->dispatchUrl('/keyfiles/download/batch', null, true);
5858

59-
// Get some coverage on the batch controller
60-
$this->resetAll();
61-
$this->dispatchUrl('/keyfiles/download/batch?items=1-2-3-&folders=1000', null);
62-
$this->assertController('download');
63-
$this->assertAction('batch');
64-
}
59+
// Get some coverage on the batch controller
60+
$this->resetAll();
61+
$this->dispatchUrl('/keyfiles/download/batch?items=1-2-3-&folders=1000', null);
62+
$this->assertController('download');
63+
$this->assertAction('batch');
64+
}
6565
}

0 commit comments

Comments
 (0)