tests/Query/Condition/ConditionTest.php 1 location
|
@@ 31-43 (lines=13) @@
|
| 28 |
|
*/ |
| 29 |
|
protected $query; |
| 30 |
|
|
| 31 |
|
public function setUp() |
| 32 |
|
{ |
| 33 |
|
parent::setUp(); |
| 34 |
|
|
| 35 |
|
$adapterMock = m::mock('Nip\Database\Adapters\MySQLi')->shouldDeferMissing(); |
| 36 |
|
$adapterMock->shouldReceive('cleanData')->andReturnUsing(function ($data) { |
| 37 |
|
return $data; |
| 38 |
|
}); |
| 39 |
|
|
| 40 |
|
$this->connection = new Connection(false); |
| 41 |
|
$this->connection->setAdapter($adapterMock); |
| 42 |
|
$this->query = $this->connection->newQuery(); |
| 43 |
|
} |
| 44 |
|
|
| 45 |
|
public function testParseString() |
| 46 |
|
{ |
tests/Query/SelectTest.php 1 location
|
@@ 141-153 (lines=13) @@
|
| 138 |
|
); |
| 139 |
|
} |
| 140 |
|
|
| 141 |
|
protected function setUp() |
| 142 |
|
{ |
| 143 |
|
parent::setUp(); |
| 144 |
|
$this->selectQuery = new Select(); |
| 145 |
|
|
| 146 |
|
$adapterMock = m::mock('Nip\Database\Adapters\MySQLi')->shouldDeferMissing(); |
| 147 |
|
$adapterMock->shouldReceive('cleanData')->andReturnUsing(function ($data) { |
| 148 |
|
return $data; |
| 149 |
|
}); |
| 150 |
|
$this->connection = new Connection(false); |
| 151 |
|
$this->connection->setAdapter($adapterMock); |
| 152 |
|
$this->selectQuery->setManager($this->connection); |
| 153 |
|
} |
| 154 |
|
} |
| 155 |
|
|