Test Failed
Push — master ( eef45f...e0c5e8 )
by P.R.
04:35
created

RowsWithLobTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 37
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace SetBased\Stratum\MySql\Test;
5
6
/**
7
 * Test cases for stored routines with designation type rows with LOBs.
8
 */
9
class RowsWithLobTest extends DataLayerTestCase
10
{
11
  //--------------------------------------------------------------------------------------------------------------------
12
  /**
13
   * Stored routine with designation type rows must return an array with 1 row when only 1 row is selected.
14
   */
15
  public function test1()
16
  {
17
    $ret = $this->dataLayer->tstTestRows1WithLob(1, 'blob');
18
    self::assertIsArray($ret);
19
    self::assertCount(1, $ret);
20
  }
21
22
  //--------------------------------------------------------------------------------------------------------------------
23
  /**
24
   * Stored routine with designation type rows must return an array with 3 rows when 3 rows are selected.
25
   */
26
  public function test2()
27
  {
28
    $ret = $this->dataLayer->tstTestRows1WithLob(3, 'blob');
29
    self::assertIsArray($ret);
30
    self::assertCount(3, $ret);
31
  }
32
33
  //--------------------------------------------------------------------------------------------------------------------
34
  /**
35
   * Stored routine with designation type rows must return an empty array when no rows are selected.
36
   */
37
  public function testSelect0Rows()
38
  {
39
    $ret = $this->dataLayer->tstTestRows1WithLob(0, 'blob');
40
    self::assertIsArray($ret);
41
    self::assertCount(0, $ret);
42
  }
43
44
  //--------------------------------------------------------------------------------------------------------------------
45
}
46
47
//----------------------------------------------------------------------------------------------------------------------
48
49