Skip to content
Permalink
Browse files

Adding tests for Query::whereNull and Query::whereNotNull

  • Loading branch information...
burzum committed Apr 9, 2018
1 parent a106f3d commit 8f5646b16bc07d80b4d7d8e256148442ab4fbc1b
Showing with 18 additions and 0 deletions.
  1. +18 −0 tests/TestCase/Database/QueryTest.php
@@ -774,6 +774,15 @@ public function testSelectWhereNull()
->execute();
$this->assertCount(5, $result);
$result->closeCursor();
$query = new Query($this->connection);
$result = $query
->select(['id'])
->from('menu_link_trees')
->whereNull('parent_id')
->execute();
$this->assertCount(5, $result);
$result->closeCursor();
}
/**
@@ -802,6 +811,15 @@ public function testSelectWhereNotNull()
->execute();
$this->assertCount(13, $result);
$result->closeCursor();
$query = new Query($this->connection);
$result = $query
->select(['id'])
->from('menu_link_trees')
->whereNotNull('parent_id')
->execute();
$this->assertCount(13, $result);
$result->closeCursor();
}
/**

0 comments on commit 8f5646b

Please sign in to comment.
You can’t perform that action at this time.