Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

removing and adapting tests that don't work with initial sample data #713

Merged
merged 1 commit into from over 1 year ago

2 participants

Lorna Jane Mitchell David Stockton
Lorna Jane Mitchell
Owner

We've got tests that fail with the default system data, this attempts to adapt or update the ones causing an issue on my system.

David Stockton dstockto merged commit beb74bc into from
David Stockton dstockto closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Mar 14, 2013
Lorna Jane Mitchell lornajane removing and adapting tests that don't work with initial sample data,…
… as they add nothing
beb74bc
This page is out of date. Refresh to see the latest.
16 src/tests/application/helpers/UserHelperTest.php
@@ -4,8 +4,6 @@
4 4
5 5 class UserHelperTest extends PHPUnit_Framework_TestCase
6 6 {
7   - private $_username = 'johndoe';
8   -
9 7 protected function setUp()
10 8 {
11 9 parent::setUp();
@@ -22,24 +20,12 @@ public function testIsUserLoggedIn()
22 20 {
23 21 $this->ci->load->model('user_model');
24 22
25   - $userDetail = $this->ci->user_model->getUserByUsername($this->_username);
  23 + $userDetail = $this->ci->user_model->getUserByID(1);
26 24 $this->ci->session->set_userdata((array)$userDetail[0]);
27 25
28 26 $this->assertTrue(user_is_auth());
29 27 }
30 28
31   - /**
32   - * Check the return value of the user_get_id()
33   - */
34   - public function testGetValidUserId()
35   - {
36   - $this->ci->load->model('user_model');
37   -
38   - $userDetail = $this->ci->user_model->getUserByUsername($this->_username);
39   - $this->ci->session->set_userdata((array)$userDetail[0]);
40   -
41   - $this->assertEquals($userDetail[0]->ID,user_get_id());
42   - }
43 29
44 30 /**
45 31 * Check the return of user_is_admin for a valid admin user
12 src/tests/application/models/TalksModelTest.php
@@ -41,18 +41,6 @@ public function testHasValidTalkClaimDetail()
41 41 $this->assertContains($result[0]->speaker_name,$claims[0]->speakers);
42 42 }
43 43
44   - public function testTalkDataDuplicateFailure()
45   - {
46   - $result = $this->ci->db->get_where('talks',array('ID >'=>10))->result();
47   - if (!is_array($result) || count($result) == 0) {
48   - $this->markTestSkipped("No suitable talk in the DB");
49   - }
50   - $talkDetail = $result[0];
51   -
52   - $speakers = array('Nonesuch User');
53   - $this->assertTrue($this->ci->talks_model->isTalkDataUnique($talkDetail,$speakers));
54   - }
55   -
56 44 }
57 45
58 46 ?>

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.