| @@ 132-141 (lines=10) @@ | ||
| 129 | $this->assertEquals($numRows1, 1); |
|
| 130 | } |
|
| 131 | ||
| 132 | public function testFoundWithFilter() { |
|
| 133 | $this->insertExample(); |
|
| 134 | $filters = [ |
|
| 135 | 'name = ?' => 'My name', |
|
| 136 | 'email = ?' => '[email protected]', |
|
| 137 | 'access_level > ?' => 0 |
|
| 138 | ]; |
|
| 139 | $user = $this->dao->fetch($filters); |
|
| 140 | $this->assertNotEquals($user->getId(), 0); |
|
| 141 | } |
|
| 142 | ||
| 143 | public function testNotFoundWithFilter() { |
|
| 144 | $this->insertExample(); |
|
| @@ 143-152 (lines=10) @@ | ||
| 140 | $this->assertNotEquals($user->getId(), 0); |
|
| 141 | } |
|
| 142 | ||
| 143 | public function testNotFoundWithFilter() { |
|
| 144 | $this->insertExample(); |
|
| 145 | $filters = [ |
|
| 146 | 'name = ?' => 'Name doesnt exist', |
|
| 147 | 'email = ?' => '[email protected]', |
|
| 148 | 'access_level > ?' => 0 |
|
| 149 | ]; |
|
| 150 | $user = $this->dao->fetch($filters); |
|
| 151 | $this->assertEquals($user->getId(), 0); |
|
| 152 | } |
|
| 153 | ||
| 154 | } |
|
| 155 | ||