Skip to content

Commit

Permalink
Splitting long test in hope of pleasing travis
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Apr 7, 2016
1 parent 75e5f8c commit 7339fc7
Showing 1 changed file with 57 additions and 10 deletions.
67 changes: 57 additions & 10 deletions tests/TestCase/Database/QueryTest.php
Expand Up @@ -434,7 +434,7 @@ public function testSelectSimpleWhere()
*
* @return void
*/
public function testSelectWhereOperators()
public function testSelectWhereOperatorMoreThan()
{
$query = new Query($this->connection);
$result = $query
Expand All @@ -445,7 +445,15 @@ public function testSelectWhereOperators()
$this->assertCount(2, $result);
$this->assertEquals(['comment' => 'First Comment for Second Article'], $result->fetch('assoc'));
$result->closeCursor();
}

/**
* Tests using where conditions with operators and scalar values works
*
* @return void
*/
public function testSelectWhereOperatorLessThan()
{
$query = new Query($this->connection);
$result = $query
->select(['title'])
Expand All @@ -455,7 +463,15 @@ public function testSelectWhereOperators()
$this->assertCount(1, $result);
$this->assertEquals(['title' => 'First Article'], $result->fetch('assoc'));
$result->closeCursor();
}

/**
* Tests using where conditions with operators and scalar values works
*
* @return void
*/
public function testSelectWhereOperatorLessThanEqual()
{
$query = new Query($this->connection);
$result = $query
->select(['title'])
Expand All @@ -464,7 +480,15 @@ public function testSelectWhereOperators()
->execute();
$this->assertCount(2, $result);
$result->closeCursor();
}

/**
* Tests using where conditions with operators and scalar values works
*
* @return void
*/
public function testSelectWhereOperatorMoreThanEqual()
{
$query = new Query($this->connection);
$result = $query
->select(['title'])
Expand All @@ -473,16 +497,15 @@ public function testSelectWhereOperators()
->execute();
$this->assertCount(3, $result);
$result->closeCursor();
}

$query = new Query($this->connection);
$result = $query
->select(['title'])
->from('articles')
->where(['id <=' => 1])
->execute();
$this->assertCount(1, $result);
$result->closeCursor();

/**
* Tests using where conditions with operators and scalar values works
*
* @return void
*/
public function testSelectWhereOperatorNotEqual()
{
$query = new Query($this->connection);
$result = $query
->select(['title'])
Expand All @@ -492,7 +515,15 @@ public function testSelectWhereOperators()
$this->assertCount(2, $result);
$this->assertEquals(['title' => 'First Article'], $result->fetch('assoc'));
$result->closeCursor();
}

/**
* Tests using where conditions with operators and scalar values works
*
* @return void
*/
public function testSelectWhereOperatorLike()
{
$query = new Query($this->connection);
$result = $query
->select(['title'])
Expand All @@ -502,7 +533,15 @@ public function testSelectWhereOperators()
$this->assertCount(1, $result);
$this->assertEquals(['title' => 'First Article'], $result->fetch('assoc'));
$result->closeCursor();
}

/**
* Tests using where conditions with operators and scalar values works
*
* @return void
*/
public function testSelectWhereOperatorLikeExpansion()
{
$query = new Query($this->connection);
$result = $query
->select(['title'])
Expand All @@ -511,7 +550,15 @@ public function testSelectWhereOperators()
->execute();
$this->assertCount(3, $result);
$result->closeCursor();
}

/**
* Tests using where conditions with operators and scalar values works
*
* @return void
*/
public function testSelectWhereOperatorNotLike()
{
$query = new Query($this->connection);
$result = $query
->select(['title'])
Expand Down

0 comments on commit 7339fc7

Please sign in to comment.