Permalink
Browse files

MINOR Whitespace

  • Loading branch information...
1 parent ea7310c commit 322d98306bd49a727544bb93724ebbbd6c155a22 @chillu chillu committed Nov 15, 2011
Showing with 17 additions and 17 deletions.
  1. +17 −17 tests/model/DataListTest.php
@@ -142,58 +142,58 @@ function testWhere() {
*/
function testByID() {
// We can get a single item by ID.
- $id = $this->idFromFixture('DataObjectTest_Team','team2');
+ $id = $this->idFromFixture('DataObjectTest_Team','team2');
$team = DataList::create("DataObjectTest_Team")->byID($id);
// byID() returns a DataObject, rather than a DataList
$this->assertInstanceOf('DataObjectTest_Team', $team);
- $this->assertEquals('Team 2', $team->Title);
+ $this->assertEquals('Team 2', $team->Title);
}
/**
* Test DataList->removeByID()
*/
function testRemoveByID() {
$list = DataList::create("DataObjectTest_Team");
- $id = $this->idFromFixture('DataObjectTest_Team','team2');
+ $id = $this->idFromFixture('DataObjectTest_Team','team2');
- $this->assertNotNull($list->byID($id));
+ $this->assertNotNull($list->byID($id));
$list->removeByID($id);
- $this->assertNull($list->byID($id));
+ $this->assertNull($list->byID($id));
}
/**
* Test DataList->canSortBy()
*/
function testCanSortBy() {
- // Basic check
+ // Basic check
$team = DataList::create("DataObjectTest_Team");
- $this->assertTrue($team->canSortBy("Title"));
- $this->assertFalse($team->canSortBy("SomethingElse"));
+ $this->assertTrue($team->canSortBy("Title"));
+ $this->assertFalse($team->canSortBy("SomethingElse"));
- // Subclasses
+ // Subclasses
$subteam = DataList::create("DataObjectTest_SubTeam");
- $this->assertTrue($subteam->canSortBy("Title"));
- $this->assertTrue($subteam->canSortBy("SubclassDatabaseField"));
+ $this->assertTrue($subteam->canSortBy("Title"));
+ $this->assertTrue($subteam->canSortBy("SubclassDatabaseField"));
}
function testDataListArrayAccess() {
- $list = DataList::create("DataObjectTest_Team")->sort("Title");
+ $list = DataList::create("DataObjectTest_Team")->sort("Title");
// We can use array access to refer to single items in the DataList, as if it were an array
- $this->assertEquals("Subteam 1", $list[0]->Title);
- $this->assertEquals("Subteam 3", $list[2]->Title);
- $this->assertEquals("Team 2", $list[4]->Title);
+ $this->assertEquals("Subteam 1", $list[0]->Title);
+ $this->assertEquals("Subteam 3", $list[2]->Title);
+ $this->assertEquals("Team 2", $list[4]->Title);
}
function testFind() {
- $list = DataList::create("DataObjectTest_Team");
+ $list = DataList::create("DataObjectTest_Team");
$record = $list->find('Title', 'Team 1');
$this->assertEquals($this->idFromFixture('DataObjectTest_Team', 'team1'), $record->ID);
}
function testFindById() {
- $list = DataList::create("DataObjectTest_Team");
+ $list = DataList::create("DataObjectTest_Team");
$record = $list->find('ID', $this->idFromFixture('DataObjectTest_Team', 'team1'));
$this->assertEquals('Team 1', $record->Title);
// Test that you can call it twice on the same list

0 comments on commit 322d983

Please sign in to comment.