|
@@ 252-263 (lines=12) @@
|
| 249 |
|
* @test |
| 250 |
|
* @return void |
| 251 |
|
*/ |
| 252 |
|
public function findRecordsWithMaxImpressionsTest() |
| 253 |
|
{ |
| 254 |
|
/** @var \DERHANSEN\SfBanners\Domain\Model\BannerDemand $demand */ |
| 255 |
|
$demand = new BannerDemand(); |
| 256 |
|
$pid = 100; |
| 257 |
|
|
| 258 |
|
/* Set starting point */ |
| 259 |
|
$demand->setStartingPoint($pid); |
| 260 |
|
|
| 261 |
|
/* Verify, that 2 records are returned */ |
| 262 |
|
$this->assertEquals(2, count($this->bannerRepository->findDemanded($demand))); |
| 263 |
|
} |
| 264 |
|
|
| 265 |
|
/** |
| 266 |
|
* Test if records are not returned, if max clicks reached |
|
@@ 271-282 (lines=12) @@
|
| 268 |
|
* @test |
| 269 |
|
* @return void |
| 270 |
|
*/ |
| 271 |
|
public function findRecordsWithMaxClicksTest() |
| 272 |
|
{ |
| 273 |
|
/** @var \DERHANSEN\SfBanners\Domain\Model\BannerDemand $demand */ |
| 274 |
|
$demand = new BannerDemand(); |
| 275 |
|
$pid = 101; |
| 276 |
|
|
| 277 |
|
/* Set starting point */ |
| 278 |
|
$demand->setStartingPoint($pid); |
| 279 |
|
|
| 280 |
|
/* Verify, that 2 records are returned */ |
| 281 |
|
$this->assertEquals(2, count($this->bannerRepository->findDemanded($demand))); |
| 282 |
|
} |
| 283 |
|
|
| 284 |
|
/** |
| 285 |
|
* Test if records are not returned, if max clicks and/or max impressions reached |
|
@@ 290-301 (lines=12) @@
|
| 287 |
|
* @test |
| 288 |
|
* @return void |
| 289 |
|
*/ |
| 290 |
|
public function findRecordsWithMaxImpressionsAndMaxClicksTest() |
| 291 |
|
{ |
| 292 |
|
/** @var \DERHANSEN\SfBanners\Domain\Model\BannerDemand $demand */ |
| 293 |
|
$demand = new BannerDemand(); |
| 294 |
|
$pid = 102; |
| 295 |
|
|
| 296 |
|
/* Set starting point */ |
| 297 |
|
$demand->setStartingPoint($pid); |
| 298 |
|
|
| 299 |
|
/* Verify, that 1 record are returned */ |
| 300 |
|
$this->assertEquals(1, count($this->bannerRepository->findDemanded($demand))); |
| 301 |
|
} |
| 302 |
|
|
| 303 |
|
/** |
| 304 |
|
* Test if expected amount of records are returned, if a mex result is set |